eric06
02-03-07, 12:25
I have a teacher in my digital forensics class that also teaches C programming. He wants us to write a program in C. only problem is i have never even looked at C code, i am just now learning Java. So the problem is this. I need to write a method in C that will get INTs from a main method he writes. The Ints are: C, HPC, H, SPT, S, LBA.
Heres the equation: LBA = (((C * HPC) + H ) * SPT) + S - 1;
Heres what i wrote for the code last night, after 3 hours of looking i gave up.
/*
Name: Eric Deering
Date: 2/3/2007
Class: DF 290 M/W/F 11-12
Description: This file will read in the variables for and calculate the size of
a hard drive
*/
{
int C, HPC, H, SPT, S, LBA;
LBA = ((( C * HPC) + H ) * SPT) + S - 1;
printf(LBA);
}
can someone help me get this working and get a main method written to test this out. He wants LBA to be output. Thanks for any help.
Heres the equation: LBA = (((C * HPC) + H ) * SPT) + S - 1;
Heres what i wrote for the code last night, after 3 hours of looking i gave up.
/*
Name: Eric Deering
Date: 2/3/2007
Class: DF 290 M/W/F 11-12
Description: This file will read in the variables for and calculate the size of
a hard drive
*/
{
int C, HPC, H, SPT, S, LBA;
LBA = ((( C * HPC) + H ) * SPT) + S - 1;
printf(LBA);
}
can someone help me get this working and get a main method written to test this out. He wants LBA to be output. Thanks for any help.