Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3: [25 points) Write a program to ask user to enter four float values. Then the program prints the four values formatted as (1) one

image text in transcribed

Q3: [25 points) Write a program to ask user to enter four float values. Then the program prints the four values formatted as (1) one value per line; (2) each value occupies 8 positions; (3) each value must has two digits after the decimal point; (3) these numbers are right- justified. For example, if user's inputs are 1.249, -12.5, 100.9, 12987.232, output should look as follows: 1.25 -12.50 100.90 12987.23 Q4: [25 points] Write a program that prints the hundreds digit of integer constant. For example, if constant is 1456, your program should print 4. If constant is 254, your program should print 2. If constant is 54, the output should be 0. Your program should include the original number followed by the digit in the hundreds position. 1456 254

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

Step: 3

blur-text-image

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

Is dynamic force caused by compression

Answered: 1 week ago

Question

Relational Contexts in Organizations

Answered: 1 week ago