HELP plz SIMPLE

1
2
3
4
5
6
7
8
9
10
11
12
13
#include<stdio.h>
int main(void)
{
quantitiy;
float wt_bar, wt_total;
printf("Enter the quantity of candy bar");
scanf(       );
printf("Enter the weight of one bar");
scanf(       );
wt_total = 
/* print the total number of candy bar *
/*print the weight of one bar */
/*print the total weight of candy bar*/


Can any one please help me out, a friend of mine send me this, and he is now in a middle of a test, I know C++, but the problem is that I don't know anything about C
is this correct

scanf("%d", &quantity);
Last edited on
If you know C++, you should be able to figure out two of the problems pretty easily. The other two, hint: scanf() is similar to std::cin<<
in C++

1
2
3
4
5
cin>>quantity;

cin>>wt_bar;

wt_total=quantity * wt_bar;
Topic archived. No new replies allowed.