Answer to Question #217937 in C++ for Rosie

Question #217937
Question 10: write a program uses for loop that print all 20 numbers with plus signs between them and a blank on either side, that is, 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20+
1
Expert's answer
2021-07-19T02:45:22-0400
#include <iostream>


using namespace std;


int main()
{
    for(int i=1; i<=20; i++)
        cout<<i<<" + ";
    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