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]
1
Expert's answer
2014-06-26T10:24:12-0400
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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS