Please help how to fix my code? My code! #include struct Student { int id; char name[30]; float percent; }; int main() { struct Student s[3]; for(int i=0;i



Please help how to fix my code?



My code!


#include




struct Student
{


int id;
char name[30];
float percent;
};


int main() {


struct Student s[3];


for(int i=0;i<>
{
scanf("%d",&s[i].id);
scanf("%s",s[i].name);
scanf("%f",&s[i].percent);
}


for(int i=0;i<>
{
printf("Records of Student %d",i+1);
printf("\nID :%d",s[i].id);
printf("\nName: %s",s[i].name);
printf("\nPercentage :%.2f",s[i].percent);
printf("\n");
}
return 0;
}


#include <stdio.h><br>2<br>LAST RUN on 3/27/2021, 9:10:14 PM<br>Check 1 failed<br>4<br>struct Student<br>Output:<br>5-<br>{<br>Records of Student 1<br>7<br>int id;<br>ID :1<br>char name [30];<br>Name: Naruto<br>float percent;<br>Percentage :86.50<br>10<br>};<br>11<br>Records of Student 2<br>12 -<br>int main() {<br>ID :2<br>13<br>Name: Luffy<br>14<br>struct Student s[3];<br>15<br>Percentage :90.50<br>for (int i=0;i<3;i++)<br>16<br>Records of Student 3<br>17<br>{<br>scanf (

Extracted text: #include 2 LAST RUN on 3/27/2021, 9:10:14 PM Check 1 failed 4 struct Student Output: 5- { Records of Student 1 7 int id; ID :1 char name [30]; Name: Naruto float percent; Percentage :86.50 10 }; 11 Records of Student 2 12 - int main() { ID :2 13 Name: Luffy 14 struct Student s[3]; 15 Percentage :90.50 for (int i=0;i<3;i++) 16="" records="" of="" student="" 3="" 17="" {="" scanf="" ("%d",="" &s[i].id);="" scanf="" ("%s",s[1].name);="" scanf="" ("%f",&s[i].percent);="" id="" :3="" 18="" name:="" goku="" 19="" 20="" percentage="" :81.00="" 21="" }="" expected:="" 22="" records="" of="" student:="" 1="" for="" (int="" i=""><3;i++) 23="" id:="" {="" printf("records="" of="" student="" %d",i+l);="" printf("\nid="" :%d",s[i].id);="" printf("\nname:="" %s",s[i].name);="" printf("\npercentage="" :%.2f",s[i].percent);="" printf("\n");="" }="" 24="" -="" 25="" name:="" 26="" percentage:="" 27="" records="" of="" student:="" 2="" 28="" 29="" id:="" 30="" name:="" 31="" return="" 0;="" percentage:="" 32="" }="" records="" of="" student:="" 3="" id:="" name:="" percentage:="" check="" 2="" failed="" output:="" records="" of="" student="" 1="" id="" :1="" name:="" bulbasaur="" percentage="" :80.00="" records="" of="" student="" 2="" id="" :2="" name:="" squirtle="" percentage="" :90.00="" records="" of="" student="" 3="" id="" :3="" name:="" charmander="" percentage="" :100.00="" expected:="" 78%="" (25:16)="" records="" of="" student:="">
#include <stdio.h><br>Name: Goku<br>Percentage :81.00<br>3<br>Expected:<br>4<br>struct Student<br>{<br>Records of STUDENT: 1<br>ID:<br>7<br>int id;<br>Name:<br>char name [30];<br>float percent;<br>8<br>Percentage:<br>10<br>};<br>Records of STUDENT: 2<br>11<br>ID:<br>12<br>int main() {<br>Name:<br>13<br>14<br>struct Student s[3];<br>Percentage:<br>15<br>Records of STUDENT: 3<br>for (int i=0;i<3;i++)<br>16<br>ID:<br>{<br>scanf (

Extracted text: #include Name: Goku Percentage :81.00 3 Expected: 4 struct Student { Records of STUDENT: 1 ID: 7 int id; Name: char name [30]; float percent; 8 Percentage: 10 }; Records of STUDENT: 2 11 ID: 12 int main() { Name: 13 14 struct Student s[3]; Percentage: 15 Records of STUDENT: 3 for (int i=0;i<3;i++) 16="" id:="" {="" scanf="" ("%d",="" &s[i].id);="" scanf="" ("%s",s[i].name);="" scanf="" ("%f",&s="" [i].percent);="" 17="" -="" name:="" 18="" 19="" percentage:="" 20="" check="" 2="" failed="" 21="" }="" output:="" 22="" for="" (int="" i=""><3;i++) records of student 1 23 { printf("records of student %d",i+1); pri printf("\nname: %s",s[i].name); printf("\npercentage :%.2f",s[i].percent); printf("\n"); 24 - id :1 25 name: bulbasaur 26 s[i].id) percentage :80.00 27 28 records of student 2 29 id :2 30 name: squirtle 31 return 0; } percentage :90.00 32 records of student 3 id :3 name: charmander percentage :100.00 expected: records of student: 1 id: name: percentage: records of student: 2 id: name: percentage: records of student: 3 id: name: percentage: show diff 78% (25:16) records="" of="" student="" 1="" 23="" {="" printf("records="" of="" student="" %d",i+1);="" pri="" printf("\nname:="" %s",s[i].name);="" printf("\npercentage="" :%.2f",s[i].percent);="" printf("\n");="" 24="" -="" id="" :1="" 25="" name:="" bulbasaur="" 26="" s[i].id)="" percentage="" :80.00="" 27="" 28="" records="" of="" student="" 2="" 29="" id="" :2="" 30="" name:="" squirtle="" 31="" return="" 0;="" }="" percentage="" :90.00="" 32="" records="" of="" student="" 3="" id="" :3="" name:="" charmander="" percentage="" :100.00="" expected:="" records="" of="" student:="" 1="" id:="" name:="" percentage:="" records="" of="" student:="" 2="" id:="" name:="" percentage:="" records="" of="" student:="" 3="" id:="" name:="" percentage:="" show="" diff="" 78%="">
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here