Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: (Multiples) Write a program that inputs two integers and determines and prints if the first is a multiple of the second. [Hint: Use

image text in transcribed

Problem 1: (Multiples) Write a program that inputs two integers and determines and prints if the first is a multiple of the second. [Hint: Use the modulus operator.] Problem 2: (Digits of an Integer) Write a program that inputs a five-digit integer separates the integer into its individual digits and prints the digits separated from one another by three spaces each in reverse order. kuldse the integer division and modulus operators.] For example, if the user types in 42339, the program should print 93 3 2 4 Problem3: Circle Formulas) Write a program that reads the radius of a circle as a positive integer, and computes and prints the diameter, the circumference and the area. Use the value 3.14159 for PI Problem4: (Sides ofa Right Triangle) Write a program that reads three nonzero integers and determines and prints whether they could be the sides of a right triangle. [ Hint: Use Pythagorean formula, a*a +b*b c where a and b are sidel and side2 respectively, and c is the hypotenuse. Provide four examples, two for yes case and two for no case. Problem 5: (Geometric Sequence and Series ) Write a program to generate a geometric sequence with first term a-1, and common ratio r 0.5. Use a while loop to generate 10 numbers in the sequence. Also, find the finite sum of the resulting geometric series. C++ program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions