Answer to Question #310897 in C++ for Secret Agent

Question #310897

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.


Let's go!


Input

A line containing an integer.

8

Output

Multiple lines containing an integer.

4
5
6
7
8




1
Expert's answer
2022-03-16T02:43:44-0400
#include <iostream>
using namespace std;


int main() {
    int n;
    cin >> n;


    for (int i=1; i<=n; i++) {
        if (i > 3) {
            cout << i << endl;
        }
    }


    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