C Programming Language: Checking Number of Subjects Chosen for a Course

Click For Summary
SUMMARY

The discussion revolves around creating a C program to check the number of subjects a student has chosen for a course, adhering to specific requirements. The program must ensure that students select a minimum of 6 subjects from a maximum of 10. It should notify the user if the selection is insufficient and include a function to count the subjects. The initial code provided is a simple template starting with int main(void) { return 0; }, which serves as a foundation for further development.

PREREQUISITES
  • Understanding of C programming syntax and structure
  • Familiarity with functions in C
  • Basic knowledge of conditional statements in C
  • Experience with user input handling in C
NEXT STEPS
  • Implement a function to count the number of subjects selected by the student
  • Learn about arrays in C to store subject selections
  • Explore conditional statements to validate the number of subjects
  • Research user input methods in C for capturing subject choices
USEFUL FOR

This discussion is beneficial for beginner C programmers, computer science students, and anyone interested in developing basic applications for academic course management.

joe88
Messages
3
Reaction score
0
my friend i fail to perform this simple task can you please direct me how to approach a simple question like this
the quetion said "a registrar set up the curriculum for the term . One course may have up to 10 subject . Students must select a minimum of 6 subjects from a particular course .Once a student registers for the term , the billing system is notified so that the student may be billed .Student may use the system to add or drop subjects for the period of time of registration.\
write a C program that will check the number of subject s the student has chosen for a course .This program will run after the student has updated the subject selection. If the number of subject is less than 6 then an appropriate message should be displayed on the screen . The program should include a function that will count the number of subjects.
 
Technology news on Phys.org
you start from something that compiles:
Code:
int main (void) {
  return 0;
}
and then add code as necessary.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K