Sunday, 5 September 2021

How to add two numbers in c++ .............

  #include<iostream>

 using namespace std;

 

 int main(){

 	

 	int a, b, sum;

 	

 	cout<<"Enter Your First Value: ";

 	cin>>a;

 	

 	cout<<"Enter Your Second Value: ";

 	cin>>b;

 	

 	sum=a+b;

 	

 	cout<<"Sum of numbers are ..."<<sum;

 	

 	return 0;

 }





No comments:

Post a Comment

Program to check whether the reverse string is a palindrome

  # include < stdio.h > # include < string.h > int main ( ) { //declare variables char str1 [ 30 ] ; int i , len...