Group_Assignment.pdf
Group_Assignment.pdf
1. Write an application that asks the user to enter two integers, obtains them from the user and prints their
sum, product, difference and quotient (division)
2. Write an application that asks the user to enter two integers, obtains them from the user and displays the
larger number followed by the words "is larger" . If the numbers are equal, print the message "These
numbers are equal" .
3. Write an application that inputs three integers from the user and displays the sum, average, product,
smallest and largest of the numbers. [Note: The calculation of the average in this exercise should result in an
integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333.
…]
4. Write an application that reads two integers, determines whether the first is a multiple of the second and
prints the result. [Hint: Use the remainder operator.]
5. Write an application that inputs one number consisting of six digits from the user, separates the number
into its individual digits and prints the digits separated from one another by three spaces each. For example,
if the user types in the number 423396 , the program should print
4 2 3 3 9 6
Assume that the user enters the correct number of digits. What happens when you enter a number with more
than six digits? What happens when you enter a number with fewer than six digits? [Hint: You’ll need to use
both division and remainder operations to “pick off ” each digit.]
%%%%%%%%%-------END------%%%%%%%%%%
This study source was downloaded by 100000898259546 from CourseHero.com on 04-12-2025 12:43:16 GMT -05:00
https://www.coursehero.com/file/153319928/Group-Assignmentpdf/
Powered by TCPDF (www.tcpdf.org)