0

Problem in the code đŸ˜„

Write a C program that input 10 students Marks (Names and Scores) as below, and print two tables for the successful and fail students.( use the Array ) No. Name Mark 1 Ali 78 2 Nasser 43 3 Saleh 26 4 Rawan 74 5 Ramees 39 6 Arwa 98 7 Reem 83 8 Ghaida 54 9 Samar 46 10 Rana 69 This is my program : #include <stdio.h> int main() { int student [10]; int marks; printf("Enter the marks"); scanf("%d",&marks); if(marks >= 60) printf("successful"); if(marks < 60) printf("fail"); return 0; }

23rd Mar 2020, 5:49 PM
Rawan
Rawan - avatar
3 Answers
+ 3
I cannot see even a single loop in your code and can make out that you are a beginner and so are most of them here on sololearn. What I would like you to do is, take the course on C language here which has covered most part of the language so that it will help you solve some similar problems in future. Anyways I will share the link to the course and some specific parts for your reference if just in case you didn't want to do the complete course. https://www.sololearn.com/Course/C/?ref=app https://www.sololearn.com/learn/C/2927/ https://www.sololearn.com/learn/C/2931/
23rd Mar 2020, 6:01 PM
Avinesh
Avinesh - avatar
+ 2
Use for loop for enter mark
25th Mar 2020, 8:48 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
thank you
24th Mar 2020, 7:24 AM
Rawan
Rawan - avatar