write a program to input three no. using main() and print its sum
Answers
Answered by
0
Answer:
include <stdio.h>
int num1,num2,num3; /* declaration of three variables */
int sum;
char line_text[50]; /* line of input from keyboard */
int main()
{
printf("Input three numbers separated by comma : ");
fgets(line_text, sizeof(line_text), stdin);
sscanf(line_text, "%d, %d, %d", &num1, &num2, &num3);
sum = num1+num2+num3;
printf("The sum of three numbers : %d\n", sum);
return(0);
}
Answered by
0
Explanation:
I can Suggest You a YouTube channel named techno boi
Attachments:
Similar questions
History,
4 months ago
Math,
4 months ago
Science,
4 months ago
Business Studies,
8 months ago
English,
1 year ago
Political Science,
1 year ago