Skip to content
VUBuddy

CS201 Practice Exercises

Introduction to Programming PDF 687 KBUpdated 23 Oct 2026
Quiz CS201 Practice Exercises PDF 687 KB
vubuddy.com
Type
Quiz
Course
CS201 Introduction to Programming
Size
PDF 687 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 687 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 49. Download the file for all 49 pages.

Hello World! Program and Operators

Create a C++ program that begins by displaying the message " Hello, World!" on the screen. Subsequently, prompt the user to enter an integer, float number and character input. Upon receiving the input, display the entered integer, float and character on the monitor screen.

The program should encompass the following functionalities:

Display Hello word! Message: The program should use the <iostream> header to incorporate standard input-output stream functionality. Upon execution, the program should display the hello Word! Message on the screens.

Input three Numbers: Program should display the message to enter an integer input and then take an integer value as input from the user. Subsequently it should display the message to enter the float input and take input the float number and lastly, program diplays the message to take character data type and then take character input from the user.

Display the Message: Once the program has taken the three data types it should displays the three data tapes i.e. integer, float and character on separate lines on the monitor screen.

Integers: 1,2, 3 etc, Float: 2.65, 3.89 etc. Characters: a, b, c , A etc. Implement a C++ program that calculates the area and perimeter of different geometrical shapes. And displays the results as per the input values provided by the users.

The program should include the following functionalities:

Calculate Area and Perimeter of the Circle: Upon execution, the program ask the user to input the radius of the circle. After getting the input it should calculate the circumference and the area of the circle. You can take the radius as float data type. Circumference of circle: 2πr.

Area of circle: πr2

Area and the Perimeter of Rectangle: Program should ask the user to take the length and width of the rectangle and calculate the area and perimeter of the Rectangle. You can take the length and width as float data type.

Perimeter of Rectangle: 2 (Length + width).

Area of Rectangle: Length x Width

Displays Result: Once your program has taken input from the user it should calculate the result of area, perimeter and circumference of corresponding geometric shape and displays it on the screen.

Float Length: 2.65, 3.89 etc. Design a C++ program that enables users to convert temperature measurements between Fahrenheit, Celsius, and Kelvin. The program should ask the user to enter a temperature value in decimal data type in corresponding unit (Fahrenheit, Celsius, or Kelvin) and then convert it to the other two units.

The program should include the following three functionalities:

Input in Fahrenheit: Upon execution, it should prompt the user to enter a temperature value in Fahrenheit. After receiving the input in doble data type then program should convert the temperature to Celsius and Kelvin by using the following formulas:

Celsius = (Fahrenheit - 32) * 5/9

Kelvin = Celsius + 273.15

Finally, the program should display the converted temperatures in Fahrenheit and Kelvin to the user.

Input in Celsius: Program should prompt the user to enter a temperature value in Celsius. After receiving the input in double data type then program should convert the temperature to Fahrenheit and Kelvin by using the following formulas:

Fahrenheit = (Celsius * 9/5) + 32

Kelvin = Celsius + 273.15

Finally, the program should display the converted temperatures in Fahrenheit and Kelvin to the user.

Input in Kelvin: it should prompt the user to enter a temperature value in Kelvin. After receiving the input in double data type, the program should convert the temperature to Fahrenheit and Celsius by using the following formulas:

Fahrenheit = (Kelvin - 273.15) * 9/5 + 32

Celsius = Kelvin - 273.15

Finally, the program should display the converted temperatures in Fahrenheit and Celsius to the user.

Float Temperature: 63.75, 63.5.89 etc.

Your program should give the one of the following outputs.

All CS201 files →
CS201 Introduction to Programming All CS201 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.