The objective for today's lab is to type in and correct a C++ program.
Follow these instructions:
- Type this program in
#include <iostream>
// Programmer: Your name
// Period: The class period
// This program obtains the _____ of the circle, prints and
// computes the _____, ______, and _______
//
//***************************************************************
// Variable Dictionary:
// PI:
Universal double point constant
// radius: Radius of the circle, obtained from the user
// diam: ________________
// circ: ________________
// area: ________________
//***************************************************************
int main( )
{
const double PI = 3.6;
double radius, diam, circ;
cinto radius
diam = 2radius;
2 (PI) radius=circumference
area = 2*PI*radius*radius
cout << "The radius is: " << "radius" << "\n";
cout << "The diameter is: " << diam ;
cout << "The circumference is: " << radius;
return 0;
}
- Compile and run the project
- Correct ALL of the syntax and logic errors
- Run the program
- Debug (correct) the program
- Click here for the solution
Use the solution to model a program that converts
Celsius to Fahrenheit. Google the equation to do the conversion