TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Max Hemmrich
NA
1
14.3k
GPA Calulator - Converting Input to Value
Feb 2 2011 4:37 PM
I'm trying to code a GPA calculator in Visual Basic 08 for an independent enrichment and have everything set up and am pretty much done, except for the actual GPA calculation part. I have 8 combo boxes, one for each class, where the user can select their grade (A, A-, B+, etc). The part I'm stuck on is the conversion from a letter grade to the corresponding GPA, for example, A = 4.0, A- = 3.7.
I tried using an if statement:
string chineseGrade;
decimal chineseGPA;
if (chineseGrade("A"))
{
chineseGPA = 4.0;
}
but i keep getting the error that "chineseGrade is a variable but is being used as a method" and that "Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type"
What can I do to solve these errors?
Reply
Answers (
3
)
student help
Change form location with draging a control