Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

language is c++ and I need it to use in code blocks Complete the following activity with your lab group. Please just write one program

language is c++ and I need it to use in code blocks

Complete the following activity with your lab group. Please just write one program that accomplishes all of the six tasks described below. However, make sure you get each one working correctly before you move on to the next.

1) Have the user type in a number. Then, have your program print the factorial of that number. Is there a limit on the size of the number for which your program can print the factorial? Why?

2) Find the sum of the odd numbers from 0 to some number entered by the user (inclusive).

3) Enter two numbers and then find the sum of all the even digits between them (inclusive). For example, if the user entered 15 and 8, your program should print 44 (14 + 12 + 10 + 8 = 44).

4) Have the user enter a number. Your program should then print all numbers less than 100, but greater than 0, which that number evenly divides. For example, if the user typed 33, then your program would print:

99

66

33

5) Using these statements one and only one time: cout << ?; cout << ; cout << endl; print the following pattern to the screen:

?

??

???

????

NOTE: You may not use any other cout statements, other than the ones mentioned above, to solve this problem.

6) Using these statements one and only one time: cout << *; cout << ; cout << endl; print the following pattern to the screen:

*

***

*****

NOTE: You may not use any other cout statements, other than the ones mentioned above, to solve this problem.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions