12. Tutorial2 - Module name: Skill2 for scientific colleges...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Module name: Skill2 for scientific colleges (710104) Tutorial 2 specified for week3 and week4 Topic: Problem solving methodology, flowchart, pseudo code, input, output, relational operators, logical operators and if statement Problem 1 Write an Algorithm and c++ program that computes and displays the area of a triangle, after the user has entered its height and base . // This program calculates the area of a triangle given its height and base. // #include <iostream.h> void main() { double area, height, base; cout << "Height: "; cin >> height; cout << "Base: "; cin >> base; area = (height * base) / 2; cout << "The area is = " << area << endl; } Problem 2 Write a flowchart and its corresponding c++ program that takes degrees centigrade from the user and displays the same temperature in degrees Fahrenheit. Be sure to label the output descriptively. The formula for the conversion is Fahrenheit= 9/5 *Centegrade +32 // This program translates degrees Centigrade into degrees Fahrenheit. // #include <iostream.h>
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

12. Tutorial2 - Module name: Skill2 for scientific colleges...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online