Answer to Question #43714 in C++ for Kiran

Question #43714
write a c++ program to print first 'n' natural number where n is the limit of number]
Expert's answer
int main() {
int limit;
std::cin >> limit;
for ( int i = 1; i <= limit; i++ ) {
std::cout << i << " ";
}
std::cout << std::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 first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal