Write a program in c/c++ that add two numbers which are between 3000000 and 5000000. the result should be shown as "number 1 + number 2 = result

Sorry. We don't do your homework for you. Create a program to solve this problem (it is a trivial one) and when you have issues with it, then post your code here for help.

Ok, this maybe the only time you are getting help for your homework..

#include<iostream>

using namespace std;

int main()
{
int a,b;
cout<<"\n Enter the numbers, only between 3000000 and 5000000...";
cin>>a>>b;
if(3000000>=a<=5000000 && 3000000>=b<=a)
cout<<"\n The sum is.."<<a+b;
cin.get();
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.