Question: write c++ program for the following question using if else while repitition loop Q3: A number N is abundant if the sum of all its

 write c++ program for the following question using if else while

repitition loop Q3: A number N is abundant if the sum of

all its positive divisors except itself is more than N. (10 marks)

Examples: N = 10, positive divisors of 10 are 1, 2 and

5. Their sum is 1+2+5 i.e. 8 which is less than 10.

So, N (i.e. 10) is not an abundant number N = 12,

positive divisors of 12 are 1, 2, 3, 4, and 6 .

Their sum is 1+2+3+4+6 i.e. 16 which is not less than 12.

write c++ program for the following question using if else while repitition loop

Q3: A number N is abundant if the sum of all its positive divisors except itself is more than N. (10 marks) Examples: N = 10, positive divisors of 10 are 1, 2 and 5. Their sum is 1+2+5 i.e. 8 which is less than 10. So, N (i.e. 10) is not an abundant number N = 12, positive divisors of 12 are 1, 2, 3, 4, and 6 . Their sum is 1+2+3+4+6 i.e. 16 which is not less than 12. So, N (i.e. 12) is an abundant number Your task is to write a pseudo code which asks user to enter a number N and displays if the number is abundant or not. Note: Your output should be either "This number is Abundant" or "This number is NOT abundant". You may the use the following if-structure, that checks if a number i is a divisor of N. if (N mod i is 0) "This means that i is a divisor of N" Q2. Write a pseudo-code or C++ code that takes as an input two numbers that defines the start and end of a range. It then prints all the integers in this range whose square also falls in the same range. (10 marks) Sample example: Input: 2 and 12 Output: 23 Explanation: since 2*2= 4 and 3*3=9 falls within the range 2-12. Input: 10 and 150 Output: 10 11 12 it is your birthday -- on that day, your speed can be 5 higher in all cases. 7. Write pseudocode for a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz" 8. Write a loop to print this fencepost pattern. Such fencepost loops can be created by placing one post i.e. I) outside your loop, and then alternating between wires (ie. ==) and posts inside the loop. 1==1==1==1==1 9. Write pseudocode for a program that takes an integer and uses a fencepost loop to print the factors of that number, separated by the word "and". For example, for the number 24, it should print the following output 1 and 2 and 3 and 4 and 6 and 8 and 12 and 10. Write pseudocode for a program which repeatedly reads integers from the user, stopping only when the user enters -1, and returns the largest value input Q3: A number N is abundant if the sum of all its positive divisors except itself is more than N. (10 marks) Examples: N = 10, positive divisors of 10 are 1, 2 and 5. Their sum is 1+2+5 i.e. 8 which is less than 10. So, N (i.e. 10) is not an abundant number N = 12, positive divisors of 12 are 1, 2, 3, 4, and 6 . Their sum is 1+2+3+4+6 i.e. 16 which is not less than 12. So, N (i.e. 12) is an abundant number Your task is to write a pseudo code which asks user to enter a number N and displays if the number is abundant or not. Note: Your output should be either This number is Abundant" or "This number is NOT abundant". You may the use the following if-structure, that checks if a number i is a divisor of N. if (N mod i is 0) "This means that i is a divisor of N" WRITE YOU CODE ON THE REVERSE SIDE. Any rough work here: QUESTION | Cuipai r r QUESTION | Cuipai r r Q2. Write a pseudo-code or C++ code that takes as an input two numbers that defines the start and end of a range. It then prints all the integers in this range whose square also falls in the same range. (10 marks ) Sample example: Input: 2 and 12 Output: 23 Explanation: since 2*2= 4 and 3*3=9 falls within the range 2-12. Input: 10 and 150 Output: 10 11 12 Start + + lr Warid OX7 % 8:02 pm Read Only - You can't save changes to... v 41. Write a program to convert Binary to Hexadecimal number system. 42. Write a program to convert Octal to Binary number system. 43. Write a program to convert Octal to Decimal number system. 44. Write a program to convert Octal to Hexadecimal number system. 45. Write a program to convert Decimal to Binary number system. 46. Write a program to convert Decimal to Octal number system. 47. Write a program to convert Decimal to Hexadecimal number system. 48. Write a program to convert Hexadecimal to Binary number system 49. Write a program to convert Hexadecimal to Octal number system. 50. Write a program to convert Hexadecimal to Decimal number system. 51. Write a program to print Pascal triangle upton rows. 52. Star pattern programs - Write a C++ program to print the given star patterns. 53. Number pattern programs - Write a C++ program to print the given number patterns O O O

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!