Advertisement
makhon007

Area

Oct 21st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,s;
  6. float d,result,into;
  7. d=.5;
  8.  
  9. printf(" Enter length = ");
  10. scanf("%d", &a);
  11.  
  12.  
  13. printf(" Enter weight = ");
  14. scanf("%d", &s);
  15. into=(d*a*s);
  16.  
  17. printf(" The result is = 1/2 * %d * %d = %.2f \n", a,s,into );
  18.  
  19. result=2*(into);
  20. printf(" The double of the result is = %.2f ", result );
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement