Display the sum of two number

#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;
clrscr(); //used to clear the console screen
printf("Enter the value of x and y:\n");  //(\n put the value on the next line)
scanf("%d%d",&x,&y);
z=x+y;
printf("The sum of two number is:%d",z);
getch();
}
OUTPUT:
Enter the value of x and y:
5
4
The sum of two number is :9
Translate »