SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 09 Nov 2017 My Price 10.00

DECLARE String returnGrade(Real avg){ //function to determine

I am having problems getting the code to work. Can someone please help me with correcting it. The project is due tomoorow. It has to look similar to my pseudocode. I tried to use the d// Program Name: Grade Average
// Purpose: To avegerage the grades
// Author Name: Courtney Credle
// Class Name and Number: Program design and developement
   CIST1305
// Instructor Name: Todd Meadors
// Last date modified: 24-July-2017
Main Module()
     Declare variables and constants
     DECLARE Real avg= 0.0
     DECLARE total=0.0
     DECLARE grades[1...4] of Integers //Use an array to store the grades
     DECLARE Integer i
     FOR i=0 to 4 //Use a looping structure to populate the array
    
        DISPLAY "Enter the "& (i+1) & " grade:"
        INPUT grades[i]

     End FOR
    
     FOR i=0 to 4 //Display each of the 4 numeric grades from the array on the screen using a looping structure
         DISPLAY "Grade "& (i+1) &" is "& grades[i]
    
     End FOR

         CALCULATE avg=total/4.00   //calculate average
         DISPLAY "The average is "& avg & "and Letter grade is "& returnGrade(avg)     //display average and grade letter
 
             // Thank the user and end the program
      DISPLAY"Thank you for using this program."
End Module()  //End of the main module

DECLARE String returnGrade(Real avg){ //function to determine the grade letter of the average
      DECLARE String grade="" //variable to hold the grade letter
     If avg>=90 && avg<=100 // check if average is in the range 90-100 inclusive and assign A to grade letter.
       grade="A"
  
     Else If avg>=80 && avg <=89 // check if average is in the range 80-89 inclusive and assign B to grade letter.
       grade="B"
   
     Else If avg>=70 && avg <=79 // check if average is in the range 70-79 inclusive and assign C to grade letter.
       grade="C"
 
     Else If avg>=60 && avg<=69 // check if average is in the range 60-69 inclusive and assign D to grade letter.
       grade="D"

     Else If(avg>=0 && avg<=59) //// check if average is in the range 0-59 inclusive and assign E to grade letter.
       grade="F"
   
     Else
      grade=" "

    End If
 
 
   RETURN grade
}


ebugger to figure it out but can not find the problem can someone please help fix this

Attachments:

Answers

(5)
Status NEW Posted 09 Nov 2017 07:11 AM My Price 10.00

----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y

Not Rated(0)