
Patrick B. answered 04/20/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
int main()
{
int n=-1;
while (n<1)
{
cout << "input # :>";
cin >> n;
}
for (int iLoop=1; iLoop<=n; iLoop++)
{
cout << iLoop;
}
}
Kat H.
asked 04/19/21Write a program that reads in a number, and writes out from 1 to that number. An input of 5 would produce 12345.
Code:
#include <iostream>
using namespace std;
int main()
{
//YOUR_CODE
}
Patrick B. answered 04/20/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
int main()
{
int n=-1;
while (n<1)
{
cout << "input # :>";
cin >> n;
}
for (int iLoop=1; iLoop<=n; iLoop++)
{
cout << iLoop;
}
}
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.