fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. float x, y,z;
  6. int sum;
  7.  
  8. printf("Please type three numbers, separated by spaces and press Enter\n");
  9. scanf("%f %f %f", &x, &y, &z);
  10. sum=x+y+z;
  11. printf("The integer sum of the given numbers is: %d\n", sum);
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2116KB
stdin
1.23 1.54 1.86
stdout
Please type three numbers, separated by spaces and press Enter
The integer sum of the given numbers is: 4