Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program that can perform the following operations: Read the following from the keyboard and store them in appropriate variables: 1. A full

Write a C program that can perform the following operations: Read the following from the keyboard and store them in appropriate variables: 1. A full name (e.g. John Smith). 2. A telephone number (e.g. 12345678900) assume all phone numbers have 11 digits. 3. A 2 digit decimal number (e.g. 22). 4. A temperature in degrees Celsius (e.g. 28.5C). Use a loop to add together the character values of the name entered and print the total on the screen. (e.g. Jet Li = 74 + 101 + 116 + 76 + 105 = 472). Divide the first 6 figures of the telephone number by the last 5 and store the result in a variable. Print the value on the screen (e.g. 123456/78900 = 1.56. Convert the decimal number to its binary equivalent and print it on the screen (e.g. 22 = 10110). Convert the temperature from degrees Celsius to degrees Fahrenheit and degrees Kelvin. Store the values in appropriate variables rounded to the closest whole number and print them on the screen (e.g. 10C 50F 283K).

image text in transcribed

Write a C program that can perform the following operations: Read the following from the keyboard and store them in appropriate variables: 1. A full name (e.g. John Smith). 2. A telephone number (e.g. 12345678900) assume all phone numbers have 11 digits. 3. A 2 digit decimal number (e.g. 22). 4. A temperature in degrees Celsius (e.g. 28.5C). . Use a loop to add together the character values of the name entered and print the total . Divide the first 6 figures of the telephone number by the last 5 and store the result in a . Convert the decimal number to its binary equivalent and print it on the screen (e.g. 22 . Convert the temperature from degrees Celsius to degrees Fahrenheit and degrees on the screen. (e.g. Jet Li 74 101 + 116 + 76 105 472) variable. Print the value on the screen (e.g. 123456/78900 1.56. - 10110). Kelvin. Store the values in appropriate variables rounded to the closest whole number and print them on the screen (e.g. 10C 50F 283K)

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

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions