Question: Computer Programming Tutorial Session 2 Objective: To familiarize and practice uses of cin and cout, and different datatypes. Lab exercises: 1) Write a C++ program
Computer Programming Tutorial Session 2 Objective: To familiarize and practice uses of cin and cout, and different datatypes. Lab exercises: 1) Write a C++ program to convert a value of temperature in Celsius to Fahrenheit. 2) Write a C++ script that would evaluate and display the area of a triangle using the formula A=s(s-a)(s-b)(s-c) where a,b and c are the sides of the triangle and s= (a+b+c)/2 3) Write a C++ code to convert a given angle in Degrees to Radians. 4) Write a C++ program that would calculate and display the distance between two given points (x1,yl,zl) and (x2,y2,z2) using the formula D = (x,-x)+(y,-y.)+(z,-2) 5) Write a C++ program that works as a currency converter. The user should input the currency in AED and change it to their required currency based on the exchange rate. 6) Write a C++ program to calculate and display the electricity charge using the relation: Charge = (Power x time of usage x 0.3) / 1000 The user should feed in the power and time of usage
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
