kk now no errors, but it doesnt make sense. lets say i punch in 49, it would spit out that the GPA is 5.0...why is that happening?

Because on line 12 you have hardcoded the input 100. Replace that with the grade variable.

Because on line 12 you have hardcoded the input 100. Replace that with the grade variable.

so what would i put inside???

I honestly feel like you arent learning lol. Thats a really basic part of programming. You are passing a variable into a function and doing operations on then returning a value. You are passing 100 into it and that is returning 5.0 because if you read inside 100 outputs 5.0. You want it so that your input is ran into the function so you go get the input from the user and save it to the variable grade. Then you want to pass grade into the function to get an output. To answer your question you have to replace 100 with grade. If I have to tell you this then all I gotta say is I hope you arent in computer science because you will be retaking this class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.