60 738
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #44890 in C for erico fire

Question #44890
write a c program that prompts a user to enter two numbers ,the system must display the summation of the number?
Expert's answer
#include <stdio.h>
#include <stdlib.h>
//main function
int main(){ 
       double summation;//variable for sum
       double firstnumber;
       double secondnumber;
  //prompt user to enter first number
       printf("Enter first number: ");
  //read first number
       scanf("%lf",&firstnumber);
       //promt user to enter second number
  printf("Enter second number: ");
  //read second number
       scanf("%lf",&secondnumber);
       summation=firstnumber+secondnumber;//add
  //the system must display the summation of the number
       printf("The summation of the number = %.3f\n",summation);
      system("PAUSE");//delay 
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions