0

Help

The Question is : Write a c program that input 10 students Marks(Names and Scores) as below , and print two table for the successful and fail students. And I’m writing this code: #include <stdio.h> int main(int argc, const char * argv []){ // insert code here... char StudentName[10][100]; int Mark[10]; printf("Enter the name with mark :"); for(int i=0 ; i<10; i++){ scanf("%s",&StudentName[i]); scanf("%d", &Mark[i]); } printf("---------------------------\n"); printf("No.\tName\t\tMark\n"); printf("---------------------------\n"); for(int i=0; i<10; i++){ printf("%d\t%s\t\t%d\n",i+1,StudentName[i], Mark[i]); printf("-------------------------------\n"); } The problem is I don’t know how can I create two tables one for successful and other for fail students , can you help me please?

27th Mar 2020, 2:09 PM
Rawan
Rawan - avatar
6 Réponses
+ 1
Thanks for all of you 💙💙
28th Mar 2020, 8:58 PM
Rawan
Rawan - avatar
0
it is just print the student name and his mark , but does not print if the student is successful or fail :(
27th Mar 2020, 2:40 PM
Rawan
Rawan - avatar
0
good , but the question want all of this information in table 😩
27th Mar 2020, 2:50 PM
Rawan
Rawan - avatar
0
Rawan Whlie printing in loop, if mark[i] >35 print information else skip by continue statement. Next by with process, same loops again, if marks[i] <35 print failure information.. Else Take one more charecter array as result[10][10] and add value if marks >35 suceess else fail. Print result[i] also but it prints table.. If you need 2tables, then you need to go for same above first method
27th Mar 2020, 3:20 PM
Jayakrishna 🇮🇳