Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by 5232 ( 17 years ago )
#include <stdio.h>
#include <conio.h>
void main ()
{
int i=0;
int Enter = 13;
int num=0;
int x=0;
int u;
int f;
int mas[10][10];
int bl[10]
clrscr();
struct spisok
{
char imya [10];
char pol ;
int rost ;
int group ;
}group[10];
while (num<10)
{
printf ("\nvvedite imya\n");
while (i<10)
{
group[num].imya [i] = getch();
if (group[num].imya [i] == Enter) break;
printf ("%c", group[num].imya [i]);
i++;
}
while (i<10)
{
group[num].imya[i] = 0;
i++;
}
i=0;
u=0;
printf("\nVVedite rost\n");
scanf ("%d",&group;[num].rost); fflush (stdin);
printf("\nVVedite gruppy\n");
scanf ("%d",&group;[num].group); fflush (stdin);
printf ("vvedite pol M/J\n");
group[num].pol = getch();
printf ("%c",group[num].pol);
printf ("\nsledyshii student\n");
x= getch();
if (x=='n') break;
num++;
}
i=0;
u=0;
while (i<10)
{
f=group[i].group;
if (mas[f][u]!=0) {u++;continue;}
mas[f][u]=group[i].rost;
i++;
u=0;
}
f=0;
while (f<10)
{
while(i<10)
{
while (u<10)
{
if (i==u) u++;
if (mas[f][i]==mas[f][u]) bl[i]++;
u++;
}
i++;
}
f++;
}
i=0;
while (i<10)
{
if (bl[i]==0) i++;
continue;
printf ("v gruppe %d %d chelovek odinakovogo rosta",i,bl[i]);
}
}
Revise this Paste
Parent: 12658