Education

Input & Output Devices

subtract program in C language


Subtract program :



step 1. Open turbo C++


step 2. Click on file and then new file


step 3. Codding
#include<stdio.h>
#include<conio.h>
Void main ()
{
Int a,b,c;
clrscr();
printf(“enter the value of a”);
scanf(“%d”,&a);
printf(“enter the value of b”);
scanf(“%d”,&b);
c=a-b;
printf(“%d”,c);
getch();
}


Step 4. Press control F9 to show output

Output is :
enter the value of a(give a value) 
enter the value of b(give a value) 
result



Comments