C program to add two numbers
>C program to add two numbers:-
#include<stdio.h> int main() { int a, b, c; printf("Enter two numbers to add\n"); scanf("%d%d",&a,&b); c = a + b; printf("Sum of entered numbers = %d\n",c); return 0; }
Output of program:
#include<stdio.h> main() { int a = 1, b = 2; a = a + b; printf("addition of a and b = %d\n", a); return 0; }
output of program:
Comments
Post a Comment