SOURCE CODE
//WAP to add two numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, sum ;
printf("ADD TWO NUMBERS\n\n") ;
printf("Enter the value of A : ") ;
scanf("%d", &a) ;
printf("Enter the value of b : ") ;
scanf("%d", &b) ;
sum=a+b ;
printf("\nThe sum of %d and %d is %d.", a,b,sum) ;
getch() ;
}
SCREENSHOT
//WAP to add two numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, sum ;
printf("ADD TWO NUMBERS\n\n") ;
printf("Enter the value of A : ") ;
scanf("%d", &a) ;
printf("Enter the value of b : ") ;
scanf("%d", &b) ;
sum=a+b ;
printf("\nThe sum of %d and %d is %d.", a,b,sum) ;
getch() ;
}
SCREENSHOT
No comments:
Post a Comment