/*
فارس محسن فوزي عباس
جروب 3
سكشن 2
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
void week1_1(){
char name[60];
}
void 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 week1_3(){
int x,y;
printf("%d + %d = %d" , x
,y
, x
+y
); printf("\n%d * %d = %d" , x
,y
, x
*y
); printf("\n%d - %d = %d" , x
,y
, x
-y
); }
void week1_4(){
int a,b,c,d;
scanf("%d %d %d %d",&a
,&b
,&c
,&d
); printf("Difference = %d", ( a
* b
)-( d
* c
)); }
void week1_5(){
float r;
printf("%f", (r
*r
) * 3.141592653); }
void week1_6(){
int N,M;
}
void week2_1(){
int num;
for(int loop = 1 ; loop <= num ; loop++)
}
void week2_2(){
int num;
for(int loop = (num < 0 ? num : 1) ; loop <= (num > 0 ? num : -1); loop++){
if(loop%2==0)
}
}
void week2_3(){
int num_total;
int even = 0,odd = 0,postive = 0,negative = 0;
int nums[num_total];
for(int i = 0 ; i < num_total ; i++)
for(int loop = 0 ; loop < num_total ; loop++){
if(nums[loop] % 2 == 0)
++even;
else
++odd;
if(nums[loop] > 0)
++postive;
else if(nums[loop] < 0)
++negative;
}
printf("Postive: %d\n",postive
); printf("Negative: %d\n",negative
); }
void week2_4(){
int nums[5];
for(int i = 0 ; i < 5 ; i++)
for(int loop = 0 ; loop < 5 ; loop++){
if(nums[loop] == 1999){
return 0;
}
else
}
}
void week2_5(){
int num_total;
int even = 0,odd = 0,postive = 0,negative = 0;
int nums[num_total];
for(int i = 0 ; i < num_total ; i++)
int comper1,comper2;
for(int start = 0 ; start < num_total ; start++)
if (nums[start] > nums[start-1])
comper1 = nums[start];
for(int end = num_total ; end > 0 ; end--)
if (nums[end] > nums[5-end])
comper2 = nums[end];
if(comper1>comper2)
else
}
void week2_6(){
int num;
for (int table = 1 ; table <= 12 ; table++)
printf("%d * %d = %d\n",num
,table
,num
*table
); }
int main(){
//week1_1();
//week1_2();
//week1_3();
//week1_4();
//week1_5();
//week1_6();
//week2_1();
//week2_2();
//week2_3();
//week2_4();
//week2_5();
//week2_6();
return 0;
}
LyoK2YHYp9ix2LMg2YXYrdiz2YYg2YHZiNiy2Yog2LnYqNin2LMK2KzYsdmI2KggMyAK2LPZg9i02YYgMgoqLwoKCiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3RkbGliLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPGN0eXBlLmg+CgoKdm9pZCB3ZWVrMV8xKCl7CgljaGFyIG5hbWVbNjBdOwoJc2NhbmYoIiVzIixuYW1lKTsKCXByaW50ZigiSGVsbG8sICVzIixuYW1lKTsKfQoKdm9pZCB3ZWVrMV8yKCl7CglpbnQgdDsKCWRvdWJsZSBkOwoJZmxvYXQgZjsKCWNoYXIgY2g7CglzY2FuZigiJWQgJWxmICVmICVjIiwgJnQsICZkLCAmZiwgJmNoKTsKCXByaW50ZigiJWQgXG4lbGYgXG4lZiBcbiVjIiwgdCwgZCwgZiwgY2gpOwp9Cgp2b2lkIHdlZWsxXzMoKXsKCWludCB4LHk7CglzY2FuZigiJWQgJWQiLCAmeCAsJnkpOwoJcHJpbnRmKCIlZCArICVkID0gJWQiICwgeCAseSAsIHgreSk7CglwcmludGYoIlxuJWQgKiAlZCA9ICVkIiAsIHggLHkgLCB4KnkpOwoJcHJpbnRmKCJcbiVkIC0gJWQgPSAlZCIgLCB4ICx5ICwgeC15KTsKfQoKdm9pZCB3ZWVrMV80KCl7CglpbnQgYSxiLGMsZDsKCXNjYW5mKCIlZCAlZCAlZCAlZCIsJmEgLCZiICwmYyAsJmQpOwoJcHJpbnRmKCJEaWZmZXJlbmNlID0gJWQiLCAoIGEgKiBiICktKCBkICogYyApKTsKfQoKdm9pZCB3ZWVrMV81KCl7CglmbG9hdCByOwoJc2NhbmYoIiVmIiwmcik7CglwcmludGYoIiVmIiwgIChyKnIpICogIDMuMTQxNTkyNjUzKTsKfQoKdm9pZCB3ZWVrMV82KCl7CglpbnQgTixNOwoJc2NhbmYoIiVkICVkIiwgJk4sICZNKTsKCXByaW50ZigiJWQiLCBOJTEwICsgTSUxMCApOwp9Cgp2b2lkIHdlZWsyXzEoKXsKICAgIGludCBudW07CiAgICBzY2FuZigiJWQiLCAmbnVtKTsKCiAgICBmb3IoaW50IGxvb3AgPSAxIDsgbG9vcCA8PSBudW0gOyBsb29wKyspCiAgICAgICAgcHJpbnRmKCIlZFxuIixsb29wKTsKfQoKdm9pZCB3ZWVrMl8yKCl7CiAgICBpbnQgbnVtOwogICAgc2NhbmYoIiVkIiwgJm51bSk7CgogICAgZm9yKGludCBsb29wID0gKG51bSA8IDAgPyBudW0gOiAxKSA7IGxvb3AgPD0gKG51bSA+IDAgPyBudW0gOiAtMSk7IGxvb3ArKyl7CiAgICAgICAgaWYobG9vcCUyPT0wKQogICAgICAgICAgICBwcmludGYoIiVkXG4iLGxvb3ApOwogICAgfQp9Cgp2b2lkIHdlZWsyXzMoKXsKCiAgICBpbnQgbnVtX3RvdGFsOwoKICAgIGludCBldmVuID0gMCxvZGQgPSAwLHBvc3RpdmUgPSAwLG5lZ2F0aXZlID0gMDsKICAgIHNjYW5mKCIlZCIsICZudW1fdG90YWwpOwoKICAgIGludCBudW1zW251bV90b3RhbF07CgogICAgZm9yKGludCBpID0gMCA7IGkgPCBudW1fdG90YWwgOyBpKyspCiAgICAgICAgc2NhbmYoIiVkIiwmbnVtc1tpXSk7CgogICAgZm9yKGludCBsb29wID0gMCA7IGxvb3AgPCBudW1fdG90YWwgOyBsb29wKyspewogICAgICAgIGlmKG51bXNbbG9vcF0gJSAyID09IDApCiAgICAgICAgICAgICsrZXZlbjsKICAgICAgICBlbHNlCiAgICAgICAgICAgICsrb2RkOwoKICAgICAgICBpZihudW1zW2xvb3BdID4gMCkKICAgICAgICAgICAgKytwb3N0aXZlOwogICAgICAgIGVsc2UgaWYobnVtc1tsb29wXSA8IDApCiAgICAgICAgICAgICsrbmVnYXRpdmU7CiAgICB9CgogICAgcHJpbnRmKCJFdmVuOiAlZFxuIixldmVuKTsKICAgIHByaW50ZigiT2RkOiAlZFxuIixvZGQpOwogICAgcHJpbnRmKCJQb3N0aXZlOiAlZFxuIixwb3N0aXZlKTsKICAgIHByaW50ZigiTmVnYXRpdmU6ICVkXG4iLG5lZ2F0aXZlKTsKfQoKCnZvaWQgd2VlazJfNCgpewoKICAgIGludCBudW1zWzVdOwoKICAgIGZvcihpbnQgaSA9IDAgOyBpIDwgNSA7IGkrKykKICAgICAgICBzY2FuZigiJWQiLCZudW1zW2ldKTsKCiAgICBmb3IoaW50IGxvb3AgPSAwIDsgbG9vcCA8IDUgOyBsb29wKyspewogICAgICAgIGlmKG51bXNbbG9vcF0gPT0gMTk5OSl7CiAgICAgICAgICAgIHByaW50ZigiQ29ycmVjdFxuIik7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgICAgICBlbHNlCiAgICAgICAgICAgIHByaW50ZigiV3JvbmdcbiIpOwogICAgfQp9Cgp2b2lkIHdlZWsyXzUoKXsKICAgIGludCBudW1fdG90YWw7CgogICAgaW50IGV2ZW4gPSAwLG9kZCA9IDAscG9zdGl2ZSA9IDAsbmVnYXRpdmUgPSAwOwogICAgc2NhbmYoIiVkIiwgJm51bV90b3RhbCk7CgogICAgaW50IG51bXNbbnVtX3RvdGFsXTsKCiAgICBmb3IoaW50IGkgPSAwIDsgaSA8IG51bV90b3RhbCA7IGkrKykKICAgICAgICBzY2FuZigiJWQiLCZudW1zW2ldKTsKCiAgICBpbnQgY29tcGVyMSxjb21wZXIyOwoKICAgIGZvcihpbnQgc3RhcnQgPSAwIDsgc3RhcnQgPCBudW1fdG90YWwgOyBzdGFydCsrKQogICAgICAgIGlmIChudW1zW3N0YXJ0XSA+IG51bXNbc3RhcnQtMV0pCiAgICAgICAgICAgIGNvbXBlcjEgPSBudW1zW3N0YXJ0XTsKCiAg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