Sign In
Ask Question
Computers & Technology
Hunter Farley
16 July, 06:27
How would you print from 1 to 1000
+2
Answers (
1
)
Nathanial Rich
16 July, 06:59
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?
Get an answer to your question ✅
“How would you print from 1 to 1000 ...”
in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers
You Might be Interested in
Gina's teacher has sent her a Word document that contains the names of all the students who are participating in the Spelling Bee. Her teacher wants her to enter these names in a spreadsheet.
Answers (2)
4. (Hypotenuse Calculations) Define a function called hypotenuse that calculates the length of the hypotenuse of a right triangle when the other two sides are given.
Answers (1)
Haya would like to completely delete Slide 11 from her presentation so that slides 12-16 become slides 11-15. What is one way she can delete Slide 11?
Answers (2)
Which database can be used on a desktop computer? A) an online dictionary B) an online shoe company that has seven hundred fifty thousand customers C) the mailing information of the 432 voters in a city council member's district D) the online
Answers (1)
Trish is applying for a store credit card. If she gets approved, at type of loan will it most likely be? A. Single Payment B. Revolving Credit C. Multi-payment loan D. Installment loan
Answers (2)
New Questions in Computers & Technology
What is the difference between a sequential access tile and a random access file?
Answers (1)
Use the following business rules to assign name to the tables on the ERD: Note: These rules are in the context of a small retail store and their charge account process.
Answers (1)
True or False: Quality of service (QoS) is a technology that allows a network design to strategically optimize network performance for select traffic types.
Answers (1)
A technician needs to be prepared to launch programs even when utility windows or the Windows desktop cannot load. What is the program name for the System Information utility? What is the program name for the Remote Desktop utility?
Answers (1)
Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in the 10.0.0.0 private address space.
Answers (1)
Home
»
Computers & Technology
» How would you print from 1 to 1000
Sign In
Sign Up
Forgot Password?