Hi, I'm Golam Rabbani.
Today, I will discuss about C programming.
Let's Go.
My Question: How do you write the sum of two numbers in C programming?
Solution:
#include <stdio.h>
int main(){
int x,y,sum;
printf("Enter 1st number\n");
scanf("%d", &x);
printf("Enter 1st number\n");
scanf("%d", &y);
sum=x+y;
printf("Result: %d\n", sum);
return 0;
}
Input:
x=10;
y=20;
Output:
Result: 30
Thank you.
Addition of two numbers in C programming
Reviewed by Golam Rabbani
on
November 18, 2018
Rating:
No comments: