Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Form not C++ Creat Program that will declare a variable of type int, one of type double, and one of type char. Initialize the

C Form not C++

Creat Program that will declare a variable of type int, one of type double, and one of type char. Initialize the integer to 10, the double to 25.59 and the character to c.

Display each value, one per line, ending with a newline. Format the double to show only one digit after the decimal point.

Display prompt messages exactly as shown below. After each prompt, read from the keyboard and store to the corresponding variable an integer, a double and a character. Print a newline after each of the values is been read in. Note that you will have to use the getchar function after reading the double (or put a blank space before the character format code), before reading the character.

Enter an integer: Enter a double: Enter a character: 

(There is exactly one space following each of the prompts.)

Display the new values, one per line, ending with a newline. Format the double to show three digits after the decimal point.

Display the integer and the double embedded in text in the format below, where the iii and dd.d represent the numeric values. Format the double to show just one digit after the decimal point. End with a newline.

The numbers are iii and ddd.d

C form not C++

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions