Friday, 21 July 2017

addition of of two numbers

#include<stdio.h>  
#include<conio.h>  
void main(){  
int x=0,y=0,result=0;  
clrscr();  
  
printf("enter first number:");  
scanf("%d",&x);  
printf("enter second number:");  
scanf("%d",&y);  
  
result=x+y;  
printf("Addition of two numbers:%d ",result);  
  
getch();  
}  


OUTPUT:

enter first number:5
enter second number:6
sum of two numbers:11

No comments:

Post a Comment

if else if program

#include<stdio.h>    #include<conio.h>    void  main(){   int  number=0;   clrscr();      printf( "enter a number:" )...