Answer to Question #269609 in C++ for frank

Question #269609

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.





The first lines will contain message prompts to input the decimal numbers.


The last line contains the sum of all negative numbers with 3 decimal places.



Example Output:



Enter n:8


4


5


6


7


8

1
Expert's answer
2021-11-21T17:33:52-0500
#include<iostream>
#include<conio.h>
using namespace std;
main()
    {
       int i,n;
       cout<<"\nEnter an integer:"<<endl;
       cin>>n;
       for(i=1;i<=n;i++)
       {
       	if(i>3)
        	{
       	 cout<<i;	
		    }
	   } 
       getch();
       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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS