Answer to Question #17807 in C++ for Arvind

Question #17807
enter stuent name and 5 no of subject marks and after asking me program continue student detail yes or no
means,
1
Expert's answer
2012-11-02T13:02:29-0400

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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS