This is a official website of instagram page @coding_planet

Saturday, November 10, 2018

Substract Two Numbers (C++ #3)

C++ Program To Substract Two Numbers 


Input:


#include<stdio.h>

int main()
{
 int a,b,sub;

 
 printf("Enter the first no.: ");
 scanf("%d",&a);

 
 printf("Enter the second no.: ");
 scanf("%d",&b);

 
 sub= a-b;
 printf("subtract is = %d\n", sub);

 return 0;
}

Output:



First run:
Enter the first no.: 10
Enter the second no.: 18
subtract is = -8

Second run:
Enter the first no.: 25
Enter the second no.: 10
subtract is = 15

*** Use Turbo C/C++ Or Dec C++ For Coding ***

Share:

Related Posts:

0 Comments:

Post a Comment

About

Blogger templates

3/recent/post-list