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
Bing In
NA
30
9k
making a scorecard
Apr 9 2016 1:54 AM
*****************************************************************
ID number name mid-term score final-term score total exam score average score grade
******************************************************************
input by user input by user
input by user
input by user
input by user
input by user input by user
help me make a scorecard above
bold type is drawn initially
only if else and Console.ReadLine() or Console.Read() and Console.WriteLine() are used
using System;
class example11
{
public static void Main()
{
Console.WriteLine("***************************************");
Console.WriteLine("ID name midexam finalexam total average grade");
Console.WriteLine("***************************************");
int id = Console.Read();
char name = Console.Read();
int mid = Console.Read();
int last = Console.Read();
int total = mid + last;
int avg = total / 2;
if (avg >= 90 && avg <= 100)
{
Console.WriteLine(id, name, mid, last, total, avg, "A");
}
else if (avg > 80 && avg < 89)
{
Console.WriteLine(id, name, mid, last, total, avg, "B");
}
else if (avg > 70 && avg < 79)
{
Console.WriteLine(id, name, mid, last, total, avg, "C");
}
else if (avg > 60 && avg < 69)
{
Console.WriteLine(id, name, mid, last, total, avg, "D");
}
else if (avg > 0 && avg < 59)
{
Console.WriteLine(id, name, mid, last, total, avg, "F");
}
}
}
Reply
Answers (
1
)
Accept a text file of Hex values and convert to decimal
insert multiline textbox into database