i need help..plz

i don't know how to display a table using this code,,,i don't know what is wrong,,, array is not allowed to use,, T_T



the output should be like this..

time(s) frequency(GHz) doppler velocity

0 5.500000040 and the ans
100 5.500000095 and the ans
200 5.500000230 and the ans
300 5.500001800 "
400 5.500000870 "
500 5.500000065 "
600 5.500000370 "




this is my code:





#include
#include
//find the doppler velocity
double
doppler(double fr)
{
double dv,ft=5.5,c=300000000;
dv=((c*(fr-ft)/ft)/2);
return(dv);
}
main()
{
clrscr();
double t,fr,dv,inputs=1;
while(inputs<=7)
{
cout<<"enter time: ";
cin>> t;
cout<<"enter received frequency in GHz/Gigahertz: ";
cin>> fr;
dv=doppler(fr);
cout<<"
"<<"time(s) "<<"frequency(GHz) "<<"Doppler velocity"<<"
";
cout<<"
"<<" "<<t<<" "<<fr<<" "<<dv<<"
"<<"
";
inputs=inputs+1;
}
getch();
return 0;
}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories