Close
Close

Enter the marks of 5 students in Chemistry, Mathematics and Physics (each out of 100) using a structure named Marks having elements roll no., name, ch

   Arya@mane

  • kindly add with C++ language also
    - talhaali0024

Answers

  •   

    Assuming you are asking question 5 in Level 2 of Structure of C in the practice section, here is the code.

    #include <stdio.h>
    
    //defining structure
    struct Marks {
        int roll_no;
        char name[30];
        float chem_marks, maths_marks, phy_marks;
    };
    
    //main function
    int main() {
    	
        struct Marks marks[5];
        
        //Getting user input for info of the 5 students
        for(int i=0; i<4; i++){
    		printf("Student %d\n",i+1);
            printf("Enter roll no. :\n");
            scanf("%d", &marks[i].roll_no);
            printf("Enter name :\n");
            scanf("%s",marks[i].name);
            printf("Enter Chemistry marks :\n");
            scanf("%f", &marks[i].chem_marks);
            printf("Enter Maths marks :\n");
            scanf("%f", &marks[i].maths_marks);
            printf("Enter Physics marks :\n");
            scanf("%f", &marks[i].phy_marks);
        }
        
        // Calculating and printing percentage for each student
    	for(int i=0; i<4; i++) {
    	    printf("Student %d\n",i+1);
    	    float percentage = (marks[i].chem_marks + marks[i].maths_marks + marks[i].phy_marks)/300.0*100;
    	    printf("Percentage : %f\n", percentage);
    	}
      return 0;
    }
    


  •    Klais

    Students are frequently swamped with assignments. And there are times when they simply do not have enough time to complete everything on time. I was in a similar circumstance. I've never been fond of writing essays. For starters, picking a topic was difficult for me, and it also boring me. Then I considered looking for a high school essay writing service , and after conducting extensive research, I discovered the best one for me. I didn't hesitate to seek for assistance, and they responded swiftly. 



  •    Lewis

    I always use the best, and the service for ordering works from australian writings is no exception. Because when I pay money for a job, I want it to be done at the appropriate level. And also so that after the order I do not worry about the timing of its completion and the quality of writing, and all this is provided to me by this service.



  •    BenTr

    I had to write a written work in order to get a high mark, and only by contacting specialist writers https://www.bestessays.com/ I managed to pass and get a high score. It's good that there are similar services that save time for students, while helping them to study at a high score.



  •    seoexpertim

    Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! internet providers Toronto



  •    NadiaLeuschke

    To create a code that would identify the five students of the class, you could use a different number for each student and then use a combination of the numbers to create a unique code. For example, if you start with 100, you could assign the numbers 1, 2, 3, 4, 5. Then you could create codes that represent the five students by adding up all the numbers and subtracting them from 100. Well, I always head to the https://www.ihatewritingessays.com/pay-for-homework website whenever I have to hire a writer to get assistance with my programming assignments.



  •    elsarus

    Welcome to | Poppy Playtime | Guide Explore new places in the horror game, be different, discover new ways to play with the poppy community All this is fun in the horror game. In this poppy game you have to survive in this puzzle/horror adventure. There is so much to explore in Poppy, the possibilities are endless. This game helps you understand what the game Poppy is about and knows how to give you unique elements. Step into the world of Poppy game and let your imagination get lost in the strange space of Poppy Playtime | Features of Poppy Playtime Game Guide: – Scary doll – Born with The Creepy – C Check out the awesome intro – Introduction to Poppy Game Time – Episode time of the poppy game – Release time of poppy game 2 – Horror game background in abandoned toys > – Plot - Benefit – Rating – Horror Game Time Game – Rules of the Game Time Horror Game - Request – How to Find the Hand of Red BrabPack – How to Get GrabPack Red Game by hand during Poppy play - Conclude - On the other hand – You use them to pull handles and levers - Of course you're not alone – Poppy’s Chapter 1 – ROM files before Poppy played the game – Poppy play time – You don't have to treat all toys as enemies – Pull lever and lever.



  •    joseanderson

    success guarantee is going to make it even more easy for you to trust that you can trust the eccouncil exams dumps buddy. You can likewise survey the believability of actual exam dumps for yourself by going through the tributes on the Eccouncil Pdf Dumps where Cyber Technician (CCT) geniuses have imparted their experience to dumps.



  •    RyanAndres

    CertsTopics offers Microsoft Endpoint Administrator real exam questions and practice test engine with real questions and verified answers. Try Endpoint Administrator exam questions for free. You can also download a free PDF demo of Microsoft Endpoint Administrator exam. Our Endpoint Administrator Combo Package for which includes PDF (Printable Format) and Testing Engine (Works on Windows and MAC) which ensures you to go through all certification topics and provides you ultimate satisfaction to pass your exam in your first attempt.

    https://www.certstopics.com/microsoft-dumps/md-102.html



Ask Yours
Post Yours
Write your answer