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...
Showing posts with label Program. Show all posts
Showing posts with label Program. Show all posts
Saturday, November 10, 2018
Add Two Numbers (C++ #2)

C++ Program To Add Two Numbers
Input:
/* C++ Program - Add Two Numbers */
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a, b, sum;
cout<<"Enter two number :";
cin>>a>>b;
...
C++ Programming Example 1 (Hello World)

C++ "Hello, World !" Program
A Simple C++ Program For Displaying "Hello, World" on Screen
...