اكتب برنامج C لحساب محيط ومساحة مستطيل ارتفاعه 7 بوصات. وعرض 5 بوصات.
- برمجة
- برمجة سي c
- 2021-05-01
- Wassim
الأجوبة
#include <stdio.h>
/* height and width of a rectangle in inches */
int width;
int height;
int area;
int perimeter;
int main() {
height = 7;
width = 5;
perimeter = 2*(height + width);
printf("Perimeter of the rectangle = %d inches\n", perimeter);
area = height * width;
printf("Area of the rectangle = %d square inches\n", area);
return(0);
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال