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.
1
Expert's answer
2012-10-10T07:59:42-0400
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.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment