Computer Science, asked by soham1221, 8 months ago

write a program to input three no. using main() and print its sum​

Answers

Answered by rpari2005
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 bnshukla1980
0

Explanation:

I can Suggest You a YouTube channel named techno boi

Attachments:
Similar questions