أرشيف study4uae

أرشيف للقراءة فقط — لا يمكن التسجيل أو المشاركة.

والي يرحم والديكم ساعدوني بلييز

العين مون — 2011-12-16 20:55 — والي يرحم والديكم ساعدوني بلييز
السلام عليكم الي يقدر يساااعدني عندي وااجب
ولازم اسلمه باااجر الساعه 10

حطيتة في فايل



بليييز

والله يعطيه العااافيه
The State 0f paRadise — 2011-12-17 16:39
حل Q1:



[FONT=&quot]#include<stdio.h>[/FONT]
[FONT=&quot]#include<conio.h>[/FONT][FONT=&quot][/FONT]
[FONT=&quot]void square();[/FONT]
[FONT=&quot]void rectangle();[/FONT]
[FONT=&quot]void main()[/FONT]
[FONT=&quot]{[/FONT]
[FONT=&quot] float side,width,height;[/FONT]
[FONT=&quot] int choice;[/FONT]
[FONT=&quot] clrscr();[/FONT][FONT=&quot]printf("caluculation of area,perimeter of squre and rectangle :\n\n");[/FONT]
[FONT=&quot] printf("\n acept choice \n\n 1. square \n\n2. rectangle:\n");[/FONT]
[FONT=&quot] printf("\n\n\enter choice:");[/FONT]
[FONT=&quot] scanf("%d",&choice);[/FONT]
[FONT=&quot] if(choice ==1[/FONT][FONT=&quot][/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]{[/FONT]
[FONT=&quot] square();[/FONT]
[FONT=&quot]}[/FONT]
[FONT=&quot] else[/FONT]
[FONT=&quot]{ [/FONT]
[FONT=&quot] rectangle();[/FONT]
[FONT=&quot]} [/FONT]
[FONT=&quot] getch();[/FONT]
[FONT=&quot]} [/FONT]
[FONT=&quot] void square()[/FONT]
[FONT=&quot]{ [/FONT]
[FONT=&quot] float side,area,perimeter;printf("enter side of the square;\n");[/FONT]
[FONT=&quot] scanf("%f",&side);[/FONT][FONT=&quot]area=side*side;perimeter=4*side;printf("\nArea is= %f \t Perimeter is=%f",area,perimeter);[/FONT]
[FONT=&quot]} void rectangle()[/FONT]
[FONT=&quot]{ float width, height,area,perimeter;printf("enter width and height of the square;\n");[/FONT]
[FONT=&quot] scanf("%f%f",&width,&height);[/FONT][FONT=&quot][/FONT]
[FONT=&quot] area=width*height;[/FONT]
[FONT=&quot] perimeter=2*(width+height);printf("\nArea is= %f \t Perimeter is=%f",area,perimeter);[/FONT]
[FONT=&quot]}[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot] [/FONT]


سأمعن النظر في السؤأل الثاني