Changes to be committed:

deleted:    proglabs/lab6/1.c
	new file:   proglabs/lab6/10.c
	new file:   proglabs/lab6/11.c
	modified:   proglabs/lab6/2.c
	modified:   proglabs/lab6/3.c
	new file:   proglabs/lab6/4.c
	new file:   proglabs/lab6/5.c
	new file:   proglabs/lab6/6.c
	new file:   proglabs/lab6/7.c
	new file:   proglabs/lab6/8.c
	new file:   proglabs/lab6/9.c
This commit is contained in:
2025-11-04 16:23:05 +07:00
parent 2f5e7989ac
commit 93cd8d90ae
12 changed files with 294 additions and 1 deletions
+15
View File
@@ -1 +1,16 @@
#include <stdio.h>
int main(){
int a,n1,sum1,n2,sum2;
n1 = sum1 = n2 = sum2 = 0;
printf("num: ");
a = 1;
while(scanf("%d", &a) && a != 0){
if (a % 2 == 0){n1++; sum1 += a;}
else if (a % 2 == 1 || a % 2 == -1){n2++; sum2 += a;}
printf("num: ");
}
printf("eve nums: %d \t eve summ: %d \t mean: %d\n",n1,sum1,(sum1/n1));
printf("odd nums: %d \t odd summ: %d \t mean: %d",n2,sum2,(sum2/n2));
return 0;
}