In: Computer Science
Write a C program that allows:
|
The integers that you have entered are: a b c The sum of a , b & c is ______ Thank you! |
C Code: |
Output screen: |
Code & Output:
//C Code :
#include<stdio.h>
void main()
{
int a,b,c;
printf("Enter 3 integers : ");
scanf("%d%d%d",&a,&b,&c);
printf("The integers that you have entered are :
\n");
printf("%d\n%d\n%d",a,b,c);
printf("\nThe sum of %d , %d & %d is %d
\nThank you!\n",a,b,c,a+b+c);
}
/*
Output Screen:
shubham@lenovo-Thinkpad-T430:~$ gcc a.c
shubham@lenovo-Thinkpad-T430:~$ ./a.out
Enter 3 integers : 4 5 6
The integers that you have entered are :
4
5
6
The sum of 4 , 5 & 6 is 15
Thank you!
shubham@lenovo-Thinkpad-T430:~$
*/
Screenshots: