Skip to content

Instantly share code, notes, and snippets.

@Reazul137
Created May 3, 2018 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Reazul137/6d498f78be5eee6491286ded43d49fd7 to your computer and use it in GitHub Desktop.
Save Reazul137/6d498f78be5eee6491286ded43d49fd7 to your computer and use it in GitHub Desktop.
MediumorchidAjarLaw created by Reazul137 - https://repl.it/@Reazul137/MediumorchidAjarLaw
/*
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