Question: please answer all the questions Question 1: Write a C++ program which produces the following output; Your program should ask the user to enter the

 please answer all the questions Question 1: Write a C++ program

please answer all the questions

Question 1: Write a C++ program which produces the following output; Your program should ask the user to enter the height (no. of rows) and then print a right-angled triangle of user specified height. For example, the above output is for height=5. Use for loop. Question 2: Repeat Question 1, using only while control structure. Question 3: Write a program that evaluates first 30 terms of the following series and prints the result: 1 +1/2+1/4+1/8+1/16 +1/32 + ... What is the result after one thousand terms? Print that too. Question 4: A positive integer n> 1 is called a prime number if it has only two positive divisors (1 and n). The first few primes are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, Write a program to list and count all prime numbers less than 10,000. Do using while loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!