Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

C Tutorial1

The document provides three programming exercises for a C++ course: 1) Write a program to convert temperatures from Fahrenheit to Celsius using the given formula. 2) Write a program to calculate the average weight in kilograms of five objects given in pounds. 3) Write a program to read and print the name and salary of an employee based on their name, hours worked, and hourly wage, then modify it to do the same for three employees.

Uploaded by

Jone Kaky
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

C Tutorial1

The document provides three programming exercises for a C++ course: 1) Write a program to convert temperatures from Fahrenheit to Celsius using the given formula. 2) Write a program to calculate the average weight in kilograms of five objects given in pounds. 3) Write a program to read and print the name and salary of an employee based on their name, hours worked, and hourly wage, then modify it to do the same for three employees.

Uploaded by

Jone Kaky
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

King Saud University College of Applied Studies and Community Service Database and Programming Diploma Second Semester

1429/1430 H C++ Programming Course CSC 1201 Tutorial (1) Revision 1- Write a program which will convert temperature from Fahrenheit to Celsius. Ask the user to enter the Fahrenheit degree, and then print the equivalent Celsius degree. The formula for converting Fahrenheit to Celsius is: C = 5 / 9 * (F 32). Instructor: Fatimah Alakeel

2- Write a program that reads weights of five objects in pounds, and then prints the average weight in kilograms. (1 kg = 2.2 pounds)

3Write a program that reads data for an employee and prints the name and salary of the employee. The data read is : a. Name. b. Number of hours worked. c. Hourly wage. .Modify the program to read and print data for three employees

You might also like