11-03-2011, 08:45 PM
|
#2
|
تاريخ التسجيل: Mar 2011
كلية: أخرى
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: الخبر
الجنس: ذكر
المشاركات: 4,052
|
رد: homework...
Program to calculate the area of the rectangle
كود:
#include<iostream.h>
int main()
{
float length;
float width;
int area;
cout<<"enter length\n";
cin>>length;
cout<<"enter wideth\n";
cin>>width;
area=length*width;
cout<<"area is"<<area;
return 0;
}
Program to calculate the perimeter rectangle
كود:
#include<iostream.h>
int main()
{
float length;
float width;
float v;
int sum;
cout<<"enter length\n";
cin>>length;
cout<<"enter wideth\n";
cin>>width;
sum=length+width;
v=2*(length+width);
cout<<"v is"<<v;
return 0;
}
|
|
|
|
|