Created
May 3, 2018 07:44
-
-
Save Reazul137/6d498f78be5eee6491286ded43d49fd7 to your computer and use it in GitHub Desktop.
MediumorchidAjarLaw created by Reazul137 - https://repl.it/@Reazul137/MediumorchidAjarLaw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Multiline comment | |
*/ | |
//pre processor directice- tells compiler iostream library which contains the function cout | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
double length, width, area, perimeter; | |
cout << "Program to computer and output the perimeter and area of a rectangele : " << endl; | |
length = 6.0; | |
width = 4.0; | |
perimeter = 2 * (length * width); | |
area = length * width; | |
cout << "Length = "<< length << endl; | |
cout << "width = " << width << endl; | |
cout << "Perimeter = "<< perimeter << endl; | |
cout << "Area = "<< area << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment