KEMBAR78
Programming C Language | PPTX
The BestTeam Leader: Brian Byrd	Team Members: Heather Garn, Diane JoynerNatara Fonseca, Derek RicksDavid Au
IntroductionReason for the programProcess  to make the programEach  team members partLimitations of the program
First Functioninteasyadd(int a, int b);// prototype for easy add if (easyadd(num1, num2)== answer)// function callprintf("Wrong! The correct answer is %d\n", easyadd(num1, num2));// function call to tell the right answerinteasyadd(int a, int b)// easyadd function definition{int sum1=0;//declare and intilize sum1    sum1= a+ b;// equation to add two numbers    return sum1;// return the sum1}//end function
Second Functioninthardadd(int c, int d);// prototype for hard add if (hardadd(num3, num4)== answer)// call function  to check their answerprintf("Wrong! The correct answer is %d\n", hardadd(num3, num4));// call function for correct answerinthardadd(int c, int d )// hardadd function definition{int sum2=0;//declare and intilize sum2    sum2= c+ d;// equation to add two numbers    return sum2;// return the sum2}// end function
Third Functioninteasysub(int e, int f);// prototype for easy subtractif (easysub(num5, num6)== answer)// call function to check their answer printf("Wrong! The correct answer is %d\n", easysub(num5, num6));// call function to give correct answerinteasysub(int e, int f)//easy subtract function definition{int sum3=0;//declare and intilize sum3    sum3= e-f;// equation to subtract two numbers    return sum3;// return the sum3}// end function
Fourth Functioninthardsub(int g, int h);// prototype for hard subtract if (hardsub(num7, num8)== answer)// call function to check their answer printf("Wrong! The correct answer is %d\n", hardsub(num7, num8));// call function to output the correct answer inthardsub(int g, int h)//hard subtract function definition{int sum4=0;//declare and intilize sum4    sum4= g-h;// equation to subtract two numbers    return sum4;// return sum4}// end function
Fifth Functionint grade(int number);// prototype for number gradeprintf("You got %d percent correct\n", grade(correct));// call function for the number gradeint grade(int number)// grade number function definition{int grade;// declare variable grade    grade=number*10;// equation to turn the number of correct answers to a number grade    return grade;// return grade}// end function
Sixth Functionchar lgrade(int number);// prototype for letter gradeprintf("You got an %c", lgrade(correct));// call letter grade function to tell what their grade is
Sixth Function- Continuechar lgrade(int number)//letter grade function definition{int grade;// declare variable grade    grade=number*10;// equation to turn the number of correct answers to a number grade    if(grade>=90)//if grade is 100-90        return 'A';// return an A grade letter    else if (grade>=80)// if grade is 89-80        return 'B';// return an B grade letter    else if (grade>=70)// if grade is 79-70        return 'C';// return an C grade letter    else if (grade>=60)// if grade is 69-60        return 'D';// return an D grade letter    else// if grade is 59 or lower        return 'F';// return an F grade letter}// end of function
ConclusionHelpful to Elementary School StudentsWhat we could include in the futureAny Questions?

Programming C Language

  • 1.
    The BestTeam Leader:Brian Byrd Team Members: Heather Garn, Diane JoynerNatara Fonseca, Derek RicksDavid Au
  • 2.
    IntroductionReason for theprogramProcess to make the programEach team members partLimitations of the program
  • 3.
    First Functioninteasyadd(int a,int b);// prototype for easy add if (easyadd(num1, num2)== answer)// function callprintf("Wrong! The correct answer is %d\n", easyadd(num1, num2));// function call to tell the right answerinteasyadd(int a, int b)// easyadd function definition{int sum1=0;//declare and intilize sum1 sum1= a+ b;// equation to add two numbers return sum1;// return the sum1}//end function
  • 4.
    Second Functioninthardadd(int c,int d);// prototype for hard add if (hardadd(num3, num4)== answer)// call function to check their answerprintf("Wrong! The correct answer is %d\n", hardadd(num3, num4));// call function for correct answerinthardadd(int c, int d )// hardadd function definition{int sum2=0;//declare and intilize sum2 sum2= c+ d;// equation to add two numbers return sum2;// return the sum2}// end function
  • 5.
    Third Functioninteasysub(int e,int f);// prototype for easy subtractif (easysub(num5, num6)== answer)// call function to check their answer printf("Wrong! The correct answer is %d\n", easysub(num5, num6));// call function to give correct answerinteasysub(int e, int f)//easy subtract function definition{int sum3=0;//declare and intilize sum3 sum3= e-f;// equation to subtract two numbers return sum3;// return the sum3}// end function
  • 6.
    Fourth Functioninthardsub(int g,int h);// prototype for hard subtract if (hardsub(num7, num8)== answer)// call function to check their answer printf("Wrong! The correct answer is %d\n", hardsub(num7, num8));// call function to output the correct answer inthardsub(int g, int h)//hard subtract function definition{int sum4=0;//declare and intilize sum4 sum4= g-h;// equation to subtract two numbers return sum4;// return sum4}// end function
  • 7.
    Fifth Functionint grade(intnumber);// prototype for number gradeprintf("You got %d percent correct\n", grade(correct));// call function for the number gradeint grade(int number)// grade number function definition{int grade;// declare variable grade grade=number*10;// equation to turn the number of correct answers to a number grade return grade;// return grade}// end function
  • 8.
    Sixth Functionchar lgrade(intnumber);// prototype for letter gradeprintf("You got an %c", lgrade(correct));// call letter grade function to tell what their grade is
  • 9.
    Sixth Function- Continuecharlgrade(int number)//letter grade function definition{int grade;// declare variable grade grade=number*10;// equation to turn the number of correct answers to a number grade if(grade>=90)//if grade is 100-90 return 'A';// return an A grade letter else if (grade>=80)// if grade is 89-80 return 'B';// return an B grade letter else if (grade>=70)// if grade is 79-70 return 'C';// return an C grade letter else if (grade>=60)// if grade is 69-60 return 'D';// return an D grade letter else// if grade is 59 or lower return 'F';// return an F grade letter}// end of function
  • 10.
    ConclusionHelpful to ElementarySchool StudentsWhat we could include in the futureAny Questions?