I wrote this program using C programming language to ask the user to give five numbers and then the program will compute the total sum of the five numbers given by the user.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price.
Program Listing
/* addition.c
Addition of Five Numbers in C
Author : Jake Rodriguez Pomperada, MAED-IT, MIT
Email : jakerpomperada@gmail.com
Tool : Dev C++ Version 5.11
Date : October 31, 2020 Saturday 7:01 PM
*/
#include <stdio.h>
int main()
{
int a=0,b=0,c=0,d=0,e=0;
int sum=0;
system("COLOR F0");
printf("\n\n");
printf("\tAddition of Five Numbers in C");
printf("\n\n");
printf("\tGive 1st Value : ");
scanf("%d",&a);
printf("\tGive 2nd Value : ");
scanf("%d",&b);
printf("\tGive 3rd Value : ");
scanf("%d",&c);
printf("\tGive 4th Value : ");
scanf("%d",&d);
printf("\tGive 5th Value : ");
scanf("%d",&e);
sum = (a+b+c+d+e);
printf("\n");
printf("\tThe total sum of %d, %d, %d, %d and %d is %d."
,a,b,c,d,e,sum);
printf("\n\n");
printf("\tEnd of Program");
printf("\n\n");
}
No comments:
Post a Comment