66 819
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #13853 in C++ for Darryl kaye Abella Sanga

Question #13853
Write a program that will ask the user to enter a number n and display all the numbers from 1 to n on a single line.
Expert's answer
#include <iostream>
using namespace std;

int main (){
cout<<"Please, Enter n\n";
int n; cin>>n;
for (int i = 0 ; i < n ; i++)
& cout<< i+1 <<' ';

system("pause");
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions