#include <stdio.h>
#include <stdlib.h>
/*
Name : kareem yasser abdlgwwad
الاسم : كريم ياسر عبد الجواد
Group : 3
جروب 3
Section : 3
سكشن 3
*/
void Sheet_week1_1(){
char _name_[60];
}
void Sheet_week1_2(){
int t;
double d;
float f;
char ch;
scanf("%d %lf %f %c", &t
, &d
, &f
, &ch
); printf("%d \n%lf \n%f \n%c", t
, d
, f
, ch
); }
void Sheet_week1_3(){
int _x_axis,_y_axis;
scanf("%d %d", &_x_axis
,&_y_axis
); printf("%d + %d = %d" , _x_axis
,_y_axis
, _x_axis
+_y_axis
); printf("\n%d * %d = %d" , _x_axis
,_y_axis
, _x_axis
*_y_axis
); printf("\n%d - %d = %d" , _x_axis
,_y_axis
, _x_axis
-_y_axis
); }
void Sheet_week1_4(){
int a,b,c,d;
scanf("%d %d %d %d",&a
,&b
,&c
,&d
); printf("Difference = %d", ( a
* b
)-( d
* c
)); }
void Sheet_week1_5(){
float r;
printf("%f", (r
*r
) * 3.141592653); }
void Sheet_week1_6(){
int N,M;
}
void Sheet_week2_1(){
int _number;
for(int loop = 1 ; loop <= _number ; loop++)
}
void Sheet_week2_2(){
int _number;
for(int loop = (_number < 0 ? _number : 1) ; loop <= (_number > 0 ? _number : -1); loop++){
if(loop%2==0)
}
}
void Sheet_week2_3(){
int num_total;
int even = 0,odd = 0,postive = 0,negative = 0;
int _numbers[num_total];
for(int i = 0 ; i < num_total ; i++)
scanf("%d",&_numbers
[i
]);
for(int loop = 0 ; loop < num_total ; loop++){
if(_numbers[loop] % 2 == 0)
++even;
else
++odd;
if(_numbers[loop] > 0)
++postive;
else if(_numbers[loop] < 0)
++negative;
}
printf("Postive: %d\n",postive
); printf("Negative: %d\n",negative
); }
void Sheet_week2_4(){
int _numbers[5];
for(int i = 0 ; i < 5 ; i++)
scanf("%d",&_numbers
[i
]);
for(int loop = 0 ; loop < 5 ; loop++){
if(_numbers[loop] == 1999){
return 0;
}
else
}
}
void Sheet_week2_5(){
int num_total;
int even = 0,odd = 0,postive = 0,negative = 0;
int _numbers[num_total];
for(int i = 0 ; i < num_total ; i++)
scanf("%d",&_numbers
[i
]);
int comper1,comper2;
for(int start = 0 ; start < num_total ; start++)
if (_numbers[start] > _numbers[start-1])
comper1 = _numbers[start];
for(int end = num_total ; end > 0 ; end--)
if (_numbers[end] > _numbers[5-end])
comper2 = _numbers[end];
if(comper1>comper2)
else
}
void Sheet_week2_6(){
int _number;
for (int table = 1 ; table <= 12 ; table++)
printf("%d * %d = %d\n",_number
,table
,_number
*table
); }
int main(){
//Sheet_week1_1();
//Sheet_week1_2();
//Sheet_week1_3();
//Sheet_week1_4();
//Sheet_week1_5();
//Sheet_week1_6();
//Sheet_week2_1();
//Sheet_week2_2();
//Sheet_week2_3();
//Sheet_week2_4();
//Sheet_week2_5();
//Sheet_week2_6();
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCi8qCk5hbWUgOiBrYXJlZW0geWFzc2VyIGFiZGxnd3dhZCAK2KfZhNin2LPZhSA6INmD2LHZitmFINmK2KfYs9ixINi52KjYryDYp9mE2KzZiNin2K8KR3JvdXAgOiAzCtis2LHZiNioIDMKU2VjdGlvbiA6IDMK2LPZg9i02YYgMwoqLwoKdm9pZCBTaGVldF93ZWVrMV8xKCl7CgljaGFyIF9uYW1lX1s2MF07CglzY2FuZigiJXMiLF9uYW1lXyk7CglwcmludGYoIkhlbGxvLCAlcyIsX25hbWVfKTsKfQoKdm9pZCBTaGVldF93ZWVrMV8yKCl7CglpbnQgdDsKCWRvdWJsZSBkOwoJZmxvYXQgZjsKCWNoYXIgY2g7CglzY2FuZigiJWQgJWxmICVmICVjIiwgJnQsICZkLCAmZiwgJmNoKTsKCXByaW50ZigiJWQgXG4lbGYgXG4lZiBcbiVjIiwgdCwgZCwgZiwgY2gpOwp9Cgp2b2lkIFNoZWV0X3dlZWsxXzMoKXsKCWludCBfeF9heGlzLF95X2F4aXM7CglzY2FuZigiJWQgJWQiLC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sgbG9vcCsrKXsKICAgICAgICBpZihfbnVtYmVyc1tsb29wXSA9PSAxOTk5KXsKICAgICAgICAgICAgcHJpbnRmKCJDb3JyZWN0XG4iKTsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICAgICAgcHJpbnRmKCJXcm9uZ1xuIik7CiAgICB9Cn0KCnZvaWQgU2hlZXRfd2VlazJfNSgpewogICAgaW50IG51bV90b3RhbDsKCiAgICBpbnQgZXZlbiA9IDAsb2RkID0gMCxwb3N0aXZlID0gMCxuZWdhdGl2ZSA9IDA7CiAgICBzY2FuZigiJWQiLCAmbnVtX3RvdGFsKTsKCiAgICBpbnQgX251bWJlcnNbbnVtX3RvdGFsXTsKCiAgICBmb3IoaW50IGkgPSAwIDsgaSA8IG51bV90b3RhbCA7IGkrKykKICAgICAgICBzY2FuZigiJWQiLCZfbnVtYmVyc1tpXSk7CgogICAgaW50IGNvbXBlcjEsY29tcGVyMjsKCiAgICBmb3IoaW50IHN0YXJ0ID0gMCA7IHN0YXJ0IDwgbnVtX3RvdGFsIDsgc3RhcnQrKykKICAgICAgICBpZiAoX251bWJlcnNbc3RhcnRdID4gX251bWJlcnNbc3RhcnQtMV0pCiAgICAgICAgICAgIGNvbXBlcjEgPSBfbnVtYmVyc1tzdGFydF07CgogICAgZm9yKGludCBlbmQgPSBudW1fdG90YWwgOyBlbmQgPiAgMCA7IGVuZC0tKQogICAgICAgIGlmIChfbnVtYmVyc1tlbmRdID4gX251bWJlcnNbNS1lbmRdKQogICAgICAgICAgICBjb21wZXIyID0gX251bWJlcnNbZW5kXTsKCiAgICBpZihjb21wZXIxPmNvbXBlcjIpCiAgICAgICAgcHJpbnRmKCIlZCIsY29tcGVyMSk7CiAgICBlbHNlCiAgICAgICAgcHJpbnRmKCIlZCIsY29tcGVyMik7Cn0KCnZvaWQgU2hlZXRfd2VlazJfNigpewogICAgaW50IF9udW1iZXI7CiAgICBwcmludGYoIkVudGVyIG51b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