exercise 4(unit 3) solution

Written by Unknown on Thursday 30 August 2012 at 12:54

Dear asahi,

Here is how to solve exercise 4.

The QUESTION IS:


So.. 
To solve it..
1.  You must understand what the programming will do?
2.  Write down the flow of the programming or you might straight away draw the flow chart.

the example on the flow chart is as followed:



STEP 2:

base on the flow chart.
write a coding.
Here is the example which implementing while loop.


#include <stdio.h>


main()
{
    int a =1;
    float total = 0;
    int total_A = 0;
    int total_B = 0;
    int total_C = 0;
    int total_D = 0;
    int total_F = 0;
    float marks;

    while (a<19)  // be aware that in the flow chart i just use 11 for 10 value, in the test data it give 18    
                           values.
    {
        printf("\nInsert the %d's student's marks = ", a);
        scanf("%f", &marks);

        if (marks>100) {
          printf("Invalid marks value(must be less than 100)");
     } else if (marks>=90) {
          //printf("Grade is: A");
          total_A+=1;
        } else if (marks>=70) {
            //printf("Grade is: B");
            total_B+=1;
          } else if (marks>=50) {
              //printf("Grade is: C");
              total_C+=1;
            } else if (marks>=35) {
                //printf("Grade is: D");
                total_D+=1;
              } else if (marks>=0) {
                  //printf("Grade is: F");
                  total_F+=1;

                } else {
                  printf("Invalid score");
                }

               a++;
    }

    printf("A's scorer = %d\n",total_A);
    printf("B's scorer = %d\n",total_B);
    printf("C's scorer= %d\n",total_C);
    printf("D's scorer= %d\n",total_D);
    printf("D's scorer= %d\n",total_F)

   }



RFID READING MATERIAL

Written by Unknown on at 10:32

Here are some good information to enhance your knowledge.

http://www.ziddu.com/download/20225195/RFIDTutorial.rar.html




RFID TECHNOLOGIES

Written by Unknown on at 09:49

Dear kuroi gakusei,

this is one of good video that can helps you to understand the application of the RFID technologies.

Enjoy the video!


WIRELESS SLIDE UNIT 4

Written by Unknown on at 09:38

DEAR ATHIRAH,

thank you so much for noticing me.

http://www.ziddu.com/download/20225002/Unit4_Jul.rar.html

SELAMAT HARI RAYA


EXERCISE 4 C PROGRAMMING(UNIT 3)

Written by Unknown on at 09:30

Assalamualaikum,

First of all I would like to thanks mr usman, mr ridzuan mohayudin, mr afdzal and mr daus for their feedback for the given exercises.

Mr hasnan has send me an email but maybe he forgotted to attach the file.

Honestly i was really frustrated, bored and upset with your attitude.

THE ONLY MAN THAT CAN CHANGE YOU IS YOU!

DO SELF MUHASABAH TO DETERMINE THE MAIN OBJECTIVE YOU ENTERING THIS COLLEGE!

you must do something!
you must do something!
you must do something!


fyi: none of you are having the right solution for exercise 4.

I do really look up for some of you to see me yesterday.
but none of you do so...



BEST OF LUCK!

C PRO SLIDE UNIT 4

Written by Unknown on Thursday 9 August 2012 at 09:45

Assalamualaikum Asahi san,

Here is your latest slide:
http://www.ziddu.com/download/20074801/UNIT4_1.rar.html


Happy Praying...

Regards

Pages

Total Pageviews

Powered by Blogger.

About the author

This blogs is developed by Norhamimi Hamdan. She works as a lecturer for Embedded System Department at Kolej kemahiran Tinggi MARA Beranang. The main purpose of this blogs is to provide information/refferences sources for students of wireless embedded devices and c programming courses.