char* name;
int mark[5];
int main()
{
char ch;
printf("Enter student name: ");
scanf("%s",&name);
for(int i=0;i<5;i++){
printf("Enter student mark #%d: ",(i+1));
scanf("%d",&mark[i]);
}
printf("Show details (y/n)");
scanf("%c",&ch);
scanf("%c",&ch);
if(ch=='y'){
printf("
%s
",&name);
printf("Student marks : ");
for(int i=0;i<5;i++){
printf("%d ",mark[i]);
}
}
int k=0;
scanf("%d",&k);
return 0;
}
Comments
Leave a comment