Sign In
Ask Question
Guest
Computers & Technology
7 April, 04:07
How would you print from 1 to 1000
+5
Answers (
1
)
Daniel Whitney
7 April, 04:23
0
There are two ways to print 1 to 1000
Using Loops. Using Recursion.
Explanation:
Using loops
for (int i=1; i<=1000; i++)
{
cout<
}
Using recursion
Remember you can implement recursion using a function only.
void print (int n)
{
if (n==0)
return;
print (n-1);
cout<
}
you should pass 1000 as an argument to the function print.
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Find an answer to your question 👍
“How would you print from 1 to 1000 ...”
in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
You Might be Interested in
How do you set a parental lock on Netfilx?
Answers (2)
Write a paragraph on the importance of backing up data and mention at least three ways to back up data from your computer.
Answers (1)
Which is the correct process for selecting nonconsecutive worksheets in a workbook?
Answers (1)
Which of the following is not a benefit of word processing application
Answers (1)
Luka is responsible for the translation of the computer program. Luka looks for errors during the stage of a computer program.
Answers (1)
New Questions in Computers & Technology
You make a phone call to your local electricity company with a question about your most recent bill. You are passed from department to department before finally getting to a representative who can address your concerns.
Answers (1)
What are the different nail disorders?
Answers (1)
Which custom configuration is most likely to include a raid array?
Answers (1)
Which describes an operating system this is multitasking
Answers (1)
With consideration to Ethernet, why is it necessary to have a common language for communication across devices.
Answers (1)
Home
»
Computers & Technology
» How would you print from 1 to 1000
Sign In
Sign Up
Forgot Password?