#include<stdio.h>
struct anik
{
char id[20];
char name[500];
float cgpa;
};
int main()
{
int n, i;
printf("Enter Any Number : ");
scanf("%d", &n);
struct anik std[n];
for(i=0; i<n; i++)
{
getchar();
printf("\nEnter Information for Person %d\n", i+1);
printf("ID : ");
gets(std[i].id);
printf("Name : ");
gets(std[i].name);
printf("CGPA : ");
scanf("%f", &std[i].cgpa);
}
for(i=0; i<n; i++)
{
printf("\nPerson No. %d\n", i+1);
printf("ID : %s\n", std[i].id);
printf("Name : %s\n", std[i].name);
printf("CGPA : %0.2f\n", std[i].cgpa);
}
return 0;
}
struct anik
{
char id[20];
char name[500];
float cgpa;
};
int main()
{
int n, i;
printf("Enter Any Number : ");
scanf("%d", &n);
struct anik std[n];
for(i=0; i<n; i++)
{
getchar();
printf("\nEnter Information for Person %d\n", i+1);
printf("ID : ");
gets(std[i].id);
printf("Name : ");
gets(std[i].name);
printf("CGPA : ");
scanf("%f", &std[i].cgpa);
}
for(i=0; i<n; i++)
{
printf("\nPerson No. %d\n", i+1);
printf("ID : %s\n", std[i].id);
printf("Name : %s\n", std[i].name);
printf("CGPA : %0.2f\n", std[i].cgpa);
}
return 0;
}
Comments
Post a Comment