Ask Experts Questions for FREE Help !
Ask
    lianardo's Avatar
    lianardo Posts: 1, Reputation: 1
    New Member
     
    #1

    Feb 15, 2012, 08:10 AM
    Please find the error of this source code for me.
    #include<stdio.h>

    Int I,j;
    Void calculate(const int b[i][j]);
    Int main()
    {
    int a[i][j];

    cal(a);
    printf("the average is %d",calculate);
    }

    Void calculate(const int b[i][j])

    {

    int counterA=0, counterB=0, counterC=0, counterD=0, counterF=0;
    int sum=0,avg,grade;

    for(I=0; I<4; I )
    for(j=0; j<2; j )

    {

    printf("Enter student grade >> ");
    scanf("%lf", &grade);
    sum =grade;
    avg=sum/8;

    if(grade>=80)
    {
    counterA ;
    }

    else
    if(grade>=70 && grade<80)
    {
    counterB ;
    }

    else
    if(grade>=60 && grade<70)
    {
    counterC ;
    }

    else
    if(grade>=50 && grade<60)
    {
    counterD ;
    }

    else
    {
    counterF ;
    }

    }

    printf("\nThe number of student that get A are >> %d", counterA);
    printf("\nThe number of student that get B are >> %d", counterB);
    printf("\nThe number of student that get C are >> %d", counterC);
    printf("\nThe number of student that get D are >> %d", counterD);
    printf("\nThe number of student that get F are >> %d", counterF);
    }
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #2

    Feb 15, 2012, 09:31 AM
    What EXACTLY is the error message you are getting.
    Debugging someone's else's code is a PITA without error messages to work on..

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Do source code converters work? [ 1 Answers ]

Hi! I have an old VB 6 application that hit's a SQl database That needs to be converted to C #. Any suggestions? Thanks, Scott

Bryant furnace - error code 34 - trying to find flame sensor to clean it... [ 1 Answers ]

Hello, Possibly a stupid question, but where exactly is the flame sensor on this furnace? Model: 340AAV036060AASA Thanks so much!


View more questions Search