write a c program that prompts a user to enter two numbers ,the system must display the summation of the number?
1
Expert's answer
2014-08-13T11:10:12-0400
#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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment