Question #273052

Make a program that will accept an integer and loop from 1 to that integer. Then, print all numbers from that range that are greater than 3.


Expert's answer

#include<iostream>
using namespace std;


int main()
{
	int n;
	cout<<"Enter an integer: ";
	cin>>n;
	for(int i=3;i<=n;i++)
	{
		if(i>3)
		{
			cout<<i<<"\n";	
		}
	} 
	cin>>n;
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS