# Answer to Question #16209 in C++ for airi

Question #16209

1.write a program to reverse the digits of a positive integer number. for example, if the number 8735 is entered, the number displayed should be 5378.(hint. use a do statement and continously strip off and display the numbers unit digit. if the variable num initially contains the number entered, the units digit is obtained as (num%10). after a units digit is displayed, dividing the number by 10 sets up the number for the next iteration.therefore, (8735%10) is 5 and (8735/10) is 873. the do statement should continue as long as the remaining number not zero.

2. a prime integer number is one that has exactly two different divisors, namely 1 and the number itself. Write, run and test a c++ program that finds all the prime numbers less than 100. (hint. 1 is a prime number. for each number from 2 to 100, find remainder = number % n, where n ranges from 2 to sqrt(number). if n is greater than sqrt (number), the number is not equally divisible by n. why? if any remainder equals 0, the number is not a prime number.

2. a prime integer number is one that has exactly two different divisors, namely 1 and the number itself. Write, run and test a c++ program that finds all the prime numbers less than 100. (hint. 1 is a prime number. for each number from 2 to 100, find remainder = number % n, where n ranges from 2 to sqrt(number). if n is greater than sqrt (number), the number is not equally divisible by n. why? if any remainder equals 0, the number is not a prime number.

Expert's answer

Unfortunately, your question requires a lot of work and cannot be done for free.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

## Comments

## Leave a comment