Students Marks Sum

Sort by

recency

|

536 Discussions

|

  • + 0 comments

    If you’re exploring premium companionship in Hartford, Connecticut, Vibe-Cities offers an interesting option vibe-cities.com . Hartford companions are known for developing for your smiles, providing a unique experience that emphasizes comfort, connection, and personalized attention. The professionals in the Hartford area create an atmosphere that excites, combining charm, elegance, and a friendly approach that makes social interactions feel effortless. What sets Hartford companions apart is their attention to detail and professionalism. Whether you are looking for someone to accompany you to a social event, dinner, or simply spend time in a relaxed setting, these services are designed to meet a variety of preferences. Each visit is tailored to ensure a positive, enjoyable experience that leaves a lasting impression. The Hartford area has cultivated a community of talented individuals who excel in making connections. They understand that the experience is not only about presence but about creating moments of genuine enjoyment and engagement. This approach ensures that every meeting feels authentic, personal, and memorable.

  • + 0 comments
    int sum = 0;
      if(gender == 'b'){
        for(int i = 0; i < number_of_students; i = i + 2){
            sum = sum + *(marks + i);
        }
      } else if(gender == 'g'){
        for(int i = 1; i < number_of_students; i = i + 2){
            sum = sum + *(marks + i);
        }
      }
      
      return sum;
    
  • + 0 comments

    include

    include

    include

    include

    //Complete the following function.

    int marks_summation(int* marks, int number_of_students, char gender) { int sum=0; if (gender=='b'){ for(int i=0;i

    } else if(gender=='g'){ for(int i=1;i

    int main() { int number_of_students; char gender; int sum;

    scanf("%d", &number_of_students);
    int *marks = (int *) malloc(number_of_students * sizeof (int));
    
    for (int student = 0; student < number_of_students; student++) {
        scanf("%d", (marks + student));
    }
    
    scanf(" %c", &gender);
    sum = marks_summation(marks, number_of_students, gender);
    printf("%d", sum);
    free(marks);
    
    return 0;
    

    }

  • + 0 comments

    int sum = 0; int starting = (gender == 'g') ? 1 : 0; for (int i = starting; i < number_of_students; i += 2){ sum += marks[i]; }
    return sum;
    }

  • + 0 comments
    int marks_summation(int* marks, int number_of_students, char gender) {
      int boys_marks = 0, girls_marks = 0;
      if (gender == 'b') {
        for (int i = 0; i < number_of_students; i+=2) {
            boys_marks += marks[i];
        }
      }else{
        for (int i = 1; i < number_of_students; i+=2) {
            girls_marks += marks[i];
        }
      }
      
      return (gender == 'b')? boys_marks: girls_marks;
    }