#include<stdio.h>
#include<stdlib.h>
typedef struct Stu
{
int a;
float b;
struct Stu *next;
}stu;
int n;
int main()
{
stu *p=stu *creat();
print();
select§;
}
stu *creat()
{
stu *head;
stu p1,p2;
n=0;
p1=p2=(stu)malloc(sizeof(stu));
scanf("%d%f",&p1->a,&p1->b);
head=NULL;
while(p1->a)
{
printf("%d\t%.2f\n",p1->a,p1->b);
n=n+1;
if(n==1)
head=p1;
else p2->next=p1;
p2=p1;
p1=(stu)malloc(sizeof(stu));
scanf("%d%f",&p1->a,&p1->b);
}
p2->next=NULL;
return head;
}
print(stu *p)
{
for(;p;p=p->next)
printf("%d\t%.2f\n",p->a,p->b);
}
select(int a)
{ int k=a;
printf(“Plesae enter number:”);
scanf("%d",&a);
stu *p=creat();
for(;p;p=p->next)
{
if(p->a==a)
{
printf("%d\t%.2f\n",p->a,p->b);
k++;
break;
}
}
if(k)
printf("NO!");
}