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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
UOG GPA Calculator
Muhammad Abdullah
May 21
2015
Code
2.9
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
gpa {
public
partial
class
Form1: Form {
float
a1, a2, a3, a4, a5, a6, a7, a8 = 0;
float
b1, b2, b3, b4, b5, b6, b7, b8 = 0;
float
s1 = 0;
float
s2 = 0;
float
s3 = 0;
float
s4 = 0;
float
s5 = 0;
float
s6 = 0;
float
s7 = 0;
float
s8 = 0;
float
total = 0;
float
gpa = 0;
float
total_crdits = 0;
private
void
Form1_Load(
object
sender, EventArgs e) {
check1();
check2();
check3();
check4();
check5();
check6();
check7();
check8();
////////////////////////////////////////
comboBox1.Items.Add(
"0.00 - 48.99"
);
comboBox1.Items.Add(
"49 - 54.49"
);
comboBox1.Items.Add(
"54.50 - 59.49"
);
comboBox1.Items.Add(
"59.50 - 64.49"
);
comboBox1.Items.Add(
"64.50 - 69.49"
);
comboBox1.Items.Add(
"69.50 - 74.49"
);
comboBox1.Items.Add(
"74.50 - 79.49"
);
comboBox1.Items.Add(
"79.50 - 84.49"
);
comboBox1.Items.Add(
"84.50 - 100"
);
/////////////////////////////////////////////
comboBox4.Items.Add(
"0.00 - 48.99"
);
comboBox4.Items.Add(
"49 - 54.49"
);
comboBox4.Items.Add(
"54.50 - 59.49"
);
comboBox4.Items.Add(
"59.50 - 64.49"
);
comboBox4.Items.Add(
"64.50 - 69.49"
);
comboBox4.Items.Add(
"69.50 - 74.49"
);
comboBox4.Items.Add(
"74.50 - 79.49"
);
comboBox4.Items.Add(
"79.50 - 84.49"
);
comboBox4.Items.Add(
"84.50 - 100"
);
/////////////////////////////////////////////
comboBox7.Items.Add(
"0.00 - 48.99"
);
comboBox7.Items.Add(
"49 - 54.49"
);
comboBox7.Items.Add(
"54.50 - 59.49"
);
comboBox7.Items.Add(
"59.50 - 64.49"
);
comboBox7.Items.Add(
"64.50 - 69.49"
);
comboBox7.Items.Add(
"69.50 - 74.49"
);
comboBox7.Items.Add(
"74.50 - 79.49"
);
comboBox7.Items.Add(
"79.50 - 84.49"
);
comboBox7.Items.Add(
"84.50 - 100"
);
///////////////////////////////////////////////
comboBox10.Items.Add(
"0.00 - 48.99"
);
comboBox10.Items.Add(
"49 - 54.49"
);
comboBox10.Items.Add(
"54.50 - 59.49"
);
comboBox10.Items.Add(
"59.50 - 64.49"
);
comboBox10.Items.Add(
"64.50 - 69.49"
);
comboBox10.Items.Add(
"69.50 - 74.49"
);
comboBox10.Items.Add(
"74.50 - 79.49"
);
comboBox10.Items.Add(
"79.50 - 84.49"
);
comboBox10.Items.Add(
"84.50 - 100"
);
////////////////////////////////////////////////
comboBox13.Items.Add(
"0.00 - 48.99"
);
comboBox13.Items.Add(
"49 - 54.49"
);
comboBox13.Items.Add(
"54.50 - 59.49"
);
comboBox13.Items.Add(
"59.50 - 64.49"
);
comboBox13.Items.Add(
"64.50 - 69.49"
);
comboBox13.Items.Add(
"69.50 - 74.49"
);
comboBox13.Items.Add(
"74.50 - 79.49"
);
comboBox13.Items.Add(
"79.50 - 84.49"
);
comboBox13.Items.Add(
"84.50 - 100"
);
////////////////////////////////////////////////
comboBox17.Items.Add(
"0.00 - 48.99"
);
comboBox17.Items.Add(
"49 - 54.49"
);
comboBox17.Items.Add(
"54.50 - 59.49"
);
comboBox17.Items.Add(
"59.50 - 64.49"
);
comboBox17.Items.Add(
"64.50 - 69.49"
);
comboBox17.Items.Add(
"69.50 - 74.49"
);
comboBox17.Items.Add(
"74.50 - 79.49"
);
comboBox17.Items.Add(
"79.50 - 84.49"
);
comboBox17.Items.Add(
"84.50 - 100"
);
//////////////////////////////////////////////////
comboBox19.Items.Add(
"0.00 - 48.99"
);
comboBox19.Items.Add(
"49 - 54.49"
);
comboBox19.Items.Add(
"54.50 - 59.49"
);
comboBox19.Items.Add(
"59.50 - 64.49"
);
comboBox19.Items.Add(
"64.50 - 69.49"
);
comboBox19.Items.Add(
"69.50 - 74.49"
);
comboBox19.Items.Add(
"74.50 - 79.49"
);
comboBox19.Items.Add(
"79.50 - 84.49"
);
comboBox19.Items.Add(
"84.50 - 100"
);
//////////////////////////////////////////////////
comboBox24.Items.Add(
"0.00 - 48.99"
);
comboBox24.Items.Add(
"49 - 54.49"
);
comboBox24.Items.Add(
"54.50 - 59.49"
);
comboBox24.Items.Add(
"59.50 - 64.49"
);
comboBox24.Items.Add(
"64.50 - 69.49"
);
comboBox24.Items.Add(
"69.50 - 74.49"
);
comboBox24.Items.Add(
"74.50 - 79.49"
);
comboBox24.Items.Add(
"79.50 - 84.49"
);
comboBox24.Items.Add(
"84.50 - 100"
);
///////////////////////////////////////////////////////////
comboBox2.Items.Add(1);
comboBox2.Items.Add(2);
comboBox2.Items.Add(3);
comboBox2.Items.Add(4);
comboBox2.Items.Add(5);
comboBox2.Items.Add(6);
///////////////////////////////////////////////////
comboBox5.Items.Add(1);
comboBox5.Items.Add(2);
comboBox5.Items.Add(3);
comboBox5.Items.Add(4);
comboBox5.Items.Add(5);
comboBox5.Items.Add(6);
///////////////////////////////////////////////
comboBox8.Items.Add(1);
comboBox8.Items.Add(2);
comboBox8.Items.Add(3);
comboBox8.Items.Add(4);
comboBox8.Items.Add(5);
comboBox8.Items.Add(6);
////////////////////////////////////////
comboBox11.Items.Add(1);
comboBox11.Items.Add(2);
comboBox11.Items.Add(3);
comboBox11.Items.Add(4);
comboBox11.Items.Add(5);
comboBox11.Items.Add(6);
///////////////////////////////////////
comboBox14.Items.Add(1);
comboBox14.Items.Add(2);
comboBox14.Items.Add(3);
comboBox14.Items.Add(4);
comboBox14.Items.Add(5);
comboBox14.Items.Add(6);
//////////////////////////////////////
comboBox16.Items.Add(1);
comboBox16.Items.Add(2);
comboBox16.Items.Add(3);
comboBox16.Items.Add(4);
comboBox16.Items.Add(5);
comboBox16.Items.Add(6);
////////////////////////////////////
comboBox20.Items.Add(1);
comboBox20.Items.Add(2);
comboBox20.Items.Add(3);
comboBox20.Items.Add(4);
comboBox20.Items.Add(5);
comboBox20.Items.Add(6);
////////////////////////////////////////////
comboBox22.Items.Add(1);
comboBox22.Items.Add(2);
comboBox22.Items.Add(3);
comboBox22.Items.Add(4);
comboBox22.Items.Add(5);
comboBox22.Items.Add(6);
///////////////////////////////////////////
}
public
Form1() {
InitializeComponent();
}
private
void
button1_Click(
object
sender, EventArgs e) {
if
(comboBox2.Text ==
" "
) {
comboBox2.Text =
"0"
;
}
if
(comboBox5.Text ==
" "
) {
comboBox5.Text =
"0"
;
}
if
(comboBox8.Text ==
" "
) {
comboBox8.Text =
"0"
;
}
if
(comboBox11.Text ==
" "
) {
comboBox11.Text =
"0"
;
}
if
(comboBox14.Text ==
" "
) {
comboBox14.Text =
"0"
;
}
if
(comboBox16.Text ==
" "
) {
comboBox16.Text =
"0"
;
}
if
(comboBox20.Text ==
" "
) {
comboBox20.Text =
"0"
;
}
if
(comboBox22.Text ==
" "
) {
comboBox22.Text =
"0"
;
}
////////////////////////////////////////
if
(comboBox1.Text ==
" "
) {
comboBox1.Text =
"0"
;
}
if
(comboBox4.Text ==
" "
) {
comboBox4.Text =
"0"
;
}
if
(comboBox7.Text ==
" "
) {
comboBox7.Text =
"0"
;
}
if
(comboBox10.Text ==
" "
) {
comboBox10.Text =
"0"
;
}
if
(comboBox13.Text ==
" "
) {
comboBox13.Text =
"0"
;
}
if
(comboBox17.Text ==
" "
) {
comboBox17.Text =
"0"
;
}
if
(comboBox19.Text ==
" "
) {
comboBox19.Text =
"0"
;
}
if
(comboBox24.Text ==
" "
) {
comboBox24.Text =
"0"
;
}
////////////////////////////////////////////////
if
(textBox1.Text ==
" "
) {
textBox1.Text =
"0"
;
}
if
(textBox2.Text ==
" "
) {
textBox2.Text =
"0"
;
}
if
(textBox3.Text ==
" "
) {
textBox3.Text =
"0"
;
}
if
(textBox4.Text ==
" "
) {
textBox4.Text =
"0"
;
}
if
(textBox5.Text ==
" "
) {
textBox5.Text =
"0"
;
}
if
(textBox6.Text ==
" "
) {
textBox6.Text =
"0"
;
}
if
(textBox7.Text ==
" "
) {
textBox7.Text =
"0"
;
}
if
(textBox8.Text ==
" "
) {
textBox8.Text =
"0"
;
}
if
(textBox9.Text ==
" "
) {
textBox9.Text =
"0"
;
}
if
(textBox10.Text ==
" "
) {
textBox10.Text =
"0"
;
}
if
(textBox11.Text ==
" "
) {
textBox11.Text =
"0"
;
}
if
(textBox12.Text ==
" "
) {
textBox12.Text =
"0"
;
}
if
(textBox13.Text ==
" "
) {
textBox13.Text =
"0"
;
}
if
(textBox14.Text ==
" "
) {
textBox14.Text =
"0"
;
}
if
(textBox15.Text ==
" "
) {
textBox15.Text =
"0"
;
}
if
(textBox16.Text ==
" "
) {
textBox16.Text =
"0"
;
}
/////////////////////////////////////////////////////////////
if
(comboBox1.Text ==
"0.00 - 48.99"
) {
textBox1.Text =
"0.00"
;
textBox9.Text =
"F"
;
}
else
if
(comboBox1.Text ==
"49 - 54.49"
) {
textBox1.Text =
"1.0"
;
textBox9.Text =
"D"
;
}
else
if
(comboBox1.Text ==
"54.50 - 59.49"
) {
textBox1.Text =
"1.5"
;
textBox9.Text =
"C"
;
}
else
if
(comboBox1.Text ==
"59.50 - 64.49"
) {
textBox1.Text =
"2.0"
;
textBox9.Text =
"C+"
;
}
else
if
(comboBox1.Text ==
"64.50 - 69.49"
) {
textBox1.Text =
"2.5"
;
textBox9.Text =
"B-"
;
}
else
if
(comboBox1.Text ==
"69.50 - 74.49"
) {
textBox1.Text =
"3.0"
;
textBox9.Text =
"B"
;
}
else
if
(comboBox1.Text ==
"74.50 - 79.49"
) {
textBox1.Text =
"3.4"
;
textBox9.Text =
"B+"
;
}
else
if
(comboBox1.Text ==
"79.50 - 84.49"
) {
textBox1.Text =
"3.7"
;
textBox9.Text =
"A"
;
}
else
if
(comboBox1.Text ==
"84.50 - 100"
) {
textBox1.Text =
"4.0"
;
textBox9.Text =
"A+"
;
}
else
if
(comboBox1.Text ==
" "
) {
textBox1.Text =
"0"
;
textBox9.Text =
"0"
;
}
else
{
textBox1.Text =
"0"
;
textBox9.Text =
"0"
;
}
/////////////////////////////////////////////////////////////////combobox1 end
if
(comboBox4.Text ==
"0.00 - 48.99"
) {
textBox2.Text =
"0.0"
;
textBox10.Text =
"F"
;
}
else
if
(comboBox4.Text ==
"49 - 54.49"
) {
textBox2.Text =
"1.0"
;
textBox10.Text =
"D"
;
}
else
if
(comboBox4.Text ==
"54.50 - 59.49"
) {
textBox2.Text =
"1.5"
;
textBox10.Text =
"C"
;
}
else
if
(comboBox4.Text ==
"59.50 - 64.49"
) {
textBox2.Text =
"2.0"
;
textBox10.Text =
"C+"
;
}
else
if
(comboBox4.Text ==
"64.50 - 69.49"
) {
textBox2.Text =
"2.5"
;
textBox10.Text =
"B-"
;
}
else
if
(comboBox4.Text ==
"69.50 - 74.49"
) {
textBox2.Text =
"3.0"
;
textBox10.Text =
"B"
;
}
else
if
(comboBox4.Text ==
"74.50 - 79.49"
) {
textBox2.Text =
"3.4"
;
textBox10.Text =
"B+"
;
}
else
if
(comboBox4.Text ==
"79.50 - 84.49"
) {
textBox2.Text =
"3.7"
;
textBox10.Text =
"A"
;
}
else
if
(comboBox4.Text ==
"84.50 - 100"
) {
textBox2.Text =
"4.0"
;
textBox10.Text =
"A+"
;
}
else
if
(comboBox4.Text ==
" "
) {
textBox2.Text =
"0"
;
textBox10.Text =
"0"
;
}
else
{
textBox2.Text =
"0"
;
textBox10.Text =
"0"
;
}
//////////////////////////////////////////////////////////////combobox4 end
if
(comboBox7.Text ==
"0.00 - 48.99"
) {
textBox3.Text =
"0.0"
;
textBox11.Text =
"F"
;
}
else
if
(comboBox7.Text ==
"49 - 54.49"
) {
textBox3.Text =
"1.0"
;
textBox11.Text =
"D"
;
}
else
if
(comboBox7.Text ==
"54.50 - 59.49"
) {
textBox3.Text =
"1.5"
;
textBox11.Text =
"C"
;
}
else
if
(comboBox7.Text ==
"59.50 - 64.49"
) {
textBox3.Text =
"2.0"
;
textBox11.Text =
"C+"
;
}
else
if
(comboBox7.Text ==
"64.50 - 69.49"
) {
textBox3.Text =
"2.5"
;
textBox11.Text =
"B-"
;
}
else
if
(comboBox7.Text ==
"69.50 - 74.49"
) {
textBox3.Text =
"3.0"
;
textBox11.Text =
"B"
;
}
else
if
(comboBox7.Text ==
"74.50 - 79.49"
) {
textBox3.Text =
"3.4"
;
textBox11.Text =
"B+"
;
}
else
if
(comboBox7.Text ==
"79.50 - 84.49"
) {
textBox3.Text =
"3.7"
;
textBox11.Text =
"A"
;
}
else
if
(comboBox7.Text ==
"84.50 - 100"
) {
textBox3.Text =
"4.0"
;
textBox11.Text =
"A+"
;
}
else
if
(comboBox7.Text ==
" "
) {
textBox3.Text =
"0"
;
textBox11.Text =
"0"
;
}
else
{
textBox3.Text =
"0"
;
textBox11.Text =
"0"
;
}
//////////////////////////////////////////////////////////////combobox7 end
if
(comboBox10.Text ==
"0.00 - 48.99"
) {
textBox4.Text =
"0.0"
;
textBox12.Text =
"F"
;
}
else
if
(comboBox10.Text ==
"49 - 54.49"
) {
textBox4.Text =
"1.0"
;
textBox12.Text =
"D"
;
}
else
if
(comboBox10.Text ==
"54.50 - 59.49"
) {
textBox4.Text =
"1.5"
;
textBox12.Text =
"C"
;
}
else
if
(comboBox10.Text ==
"59.50 - 64.49"
) {
textBox4.Text =
"2.0"
;
textBox12.Text =
"C+"
;
}
else
if
(comboBox10.Text ==
"64.50 - 69.49"
) {
textBox4.Text =
"2.5"
;
textBox12.Text =
"B-"
;
}
else
if
(comboBox10.Text ==
"69.50 - 74.49"
) {
textBox4.Text =
"3.0"
;
textBox12.Text =
"B"
;
}
else
if
(comboBox10.Text ==
"74.50 - 79.49"
) {
textBox4.Text =
"3.4"
;
textBox12.Text =
"B+"
;
}
else
if
(comboBox10.Text ==
"79.50 - 84.49"
) {
textBox4.Text =
"3.7"
;
textBox12.Text =
"A"
;
}
else
if
(comboBox10.Text ==
"84.50 - 100"
) {
textBox4.Text =
"4.0"
;
textBox12.Text =
"A+"
;
}
else
if
(comboBox10.Text ==
" "
) {
textBox4.Text =
"0"
;
textBox12.Text =
"0"
;
}
else
{
textBox4.Text =
"0"
;
textBox12.Text =
"0"
;
}
////////////////////////////////////////////////////////////////////combobox10 end
if
(comboBox13.Text ==
"0.00 - 48.99"
) {
textBox5.Text =
"0.0"
;
textBox13.Text =
"F"
;
}
else
if
(comboBox13.Text ==
"49 - 54.49"
) {
textBox5.Text =
"1.0"
;
textBox13.Text =
"D"
;
}
else
if
(comboBox13.Text ==
"54.50 - 59.49"
) {
textBox5.Text =
"1.5"
;
textBox13.Text =
"C"
;
}
else
if
(comboBox13.Text ==
"59.50 - 64.49"
) {
textBox5.Text =
"2.0"
;
textBox13.Text =
"C+"
;
}
else
if
(comboBox13.Text ==
"64.50 - 69.49"
) {
textBox5.Text =
"2.5"
;
textBox13.Text =
"B-"
;
}
else
if
(comboBox13.Text ==
"69.50 - 74.49"
) {
textBox5.Text =
"3.0"
;
textBox13.Text =
"B"
;
}
else
if
(comboBox13.Text ==
"74.50 - 79.49"
) {
textBox5.Text =
"3.4"
;
textBox13.Text =
"B+"
;
}
else
if
(comboBox13.Text ==
"79.50 - 84.49"
) {
textBox5.Text =
"3.7"
;
textBox13.Text =
"A"
;
}
else
if
(comboBox13.Text ==
"84.50 - 100"
) {
textBox5.Text =
"4.0"
;
textBox13.Text =
"A+"
;
}
else
if
(comboBox13.Text ==
" "
) {
textBox5.Text =
"0"
;
textBox13.Text =
"0"
;
}
else
{
textBox5.Text =
"0"
;
textBox13.Text =
"0"
;
}
////////////////////////////////////////////////////////combobox13 end
if
(comboBox17.Text ==
"0.00 - 48.99"
) {
textBox6.Text =
"0.0"
;
textBox14.Text =
"F"
;
}
else
if
(comboBox17.Text ==
"49 - 54.49"
) {
textBox6.Text =
"1.0"
;
textBox14.Text =
"D"
;
}
else
if
(comboBox17.Text ==
"54.50 - 59.49"
) {
textBox6.Text =
"1.5"
;
textBox14.Text =
"C"
;
}
else
if
(comboBox17.Text ==
"59.50 - 64.49"
) {
textBox6.Text =
"2.0"
;
textBox14.Text =
"C+"
;
}
else
if
(comboBox17.Text ==
"64.50 - 69.49"
) {
textBox6.Text =
"2.5"
;
textBox14.Text =
"B-"
;
}
else
if
(comboBox17.Text ==
"69.50 - 74.49"
) {
textBox6.Text =
"3.0"
;
textBox14.Text =
"B"
;
}
else
if
(comboBox17.Text ==
"74.50 - 79.49"
) {
textBox6.Text =
"3.4"
;
textBox14.Text =
"B+"
;
}
else
if
(comboBox17.Text ==
"79.50 - 84.49"
) {
textBox6.Text =
"3.7"
;
textBox14.Text =
"A"
;
}
else
if
(comboBox17.Text ==
"84.50 - 100"
) {
textBox6.Text =
"4.0"
;
textBox14.Text =
"A+"
;
}
else
if
(comboBox17.Text ==
" "
) {
textBox6.Text =
"0"
;
textBox14.Text =
"0"
;
}
else
{
textBox6.Text =
"0"
;
textBox16.Text =
"0"
;
}
//////////////////////////////////////////////////combobox17 end
if
(comboBox19.Text ==
"0.00 - 48.99"
) {
textBox7.Text =
"0.0"
;
textBox15.Text =
"F"
;
}
else
if
(comboBox19.Text ==
"49 - 54.49"
) {
textBox7.Text =
"1.0"
;
textBox15.Text =
"D"
;
}
else
if
(comboBox19.Text ==
"54.50 - 59.49"
) {
textBox7.Text =
"1.5"
;
textBox15.Text =
"C"
;
}
else
if
(comboBox19.Text ==
"59.50 - 64.49"
) {
textBox7.Text =
"2.0"
;
textBox15.Text =
"C+"
;
}
else
if
(comboBox19.Text ==
"64.50 - 69.49"
) {
textBox7.Text =
"2.5"
;
textBox15.Text =
"B-"
;
}
else
if
(comboBox19.Text ==
"69.50 - 74.49"
) {
textBox7.Text =
"3.0"
;
textBox15.Text =
"B"
;
}
else
if
(comboBox19.Text ==
"74.50 - 79.49"
) {
textBox7.Text =
"3.4"
;
textBox15.Text =
"B+"
;
}
else
if
(comboBox19.Text ==
"79.50 - 84.49"
) {
textBox7.Text =
"3.7"
;
textBox15.Text =
"A"
;
}
else
if
(comboBox19.Text ==
"84.50 - 100"
) {
textBox7.Text =
"4.0"
;
textBox15.Text =
"A+"
;
}
else
if
(comboBox19.Text ==
" "
) {
textBox7.Text =
"0"
;
textBox15.Text =
"0"
;
}
else
{
textBox7.Text =
"0"
;
textBox15.Text =
"0"
;
}
////////////////////////////////////////////////////combobox19 end
if
(comboBox24.Text ==
"0.00 - 48.99"
) {
textBox8.Text =
"0.0"
;
textBox16.Text =
"F"
;
}
else
if
(comboBox24.Text ==
"49 - 54.49"
) {
textBox8.Text =
"1.0"
;
textBox16.Text =
"D"
;
}
else
if
(comboBox24.Text ==
"54.50 - 59.49"
) {
textBox8.Text =
"1.5"
;
textBox16.Text =
"C"
;
}
else
if
(comboBox24.Text ==
"59.50 - 64.49"
) {
textBox8.Text =
"2.0"
;
textBox16.Text =
"C+"
;
}
else
if
(comboBox24.Text ==
"64.50 - 69.49"
) {
textBox8.Text =
"2.5"
;
textBox16.Text =
"B-"
;
}
else
if
(comboBox24.Text ==
"69.50 - 74.49"
) {
textBox8.Text =
"3.0"
;
textBox16.Text =
"B"
;
}
else
if
(comboBox24.Text ==
"74.50 - 79.49"
) {
textBox8.Text =
"3.4"
;
textBox16.Text =
"B+"
;
}
else
if
(comboBox24.Text ==
"79.50 - 84.49"
) {
textBox8.Text =
"3.7"
;
textBox16.Text =
"A"
;
}
else
if
(comboBox24.Text ==
"84.50 - 100"
) {
textBox8.Text =
"4.0"
;
textBox16.Text =
"A+"
;
}
else
if
(comboBox24.Text ==
" "
) {
textBox8.Text =
"0"
;
textBox16.Text =
"0"
;
}
else
{
textBox8.Text =
"0"
;
textBox16.Text =
"0"
;
}
//////////////////////////////////////////////////combobox24 end
//////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked && checkBox7.Checked && checkBox8.Checked) {
//////////////////////////////////////////////////////////////////////////////////
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
/////////////////////////////////////subject 1
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
/////////////////////////////////////////////////subject 2
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
//////////////////////////////////////subject 3
a4 =
float
.Parse(comboBox11.Text);
b4 =
float
.Parse(textBox4.Text);
s4 = a4 * b4;
//////////////////////////////////////////subject 4
a5 =
float
.Parse(comboBox14.Text);
b5 =
float
.Parse(textBox5.Text);
s5 = a5 * b5;
////////////////////////////////////////subject 5
a6 =
float
.Parse(comboBox16.Text);
b6 =
float
.Parse(textBox6.Text);
s6 = a6 * b6;
///////////////////////////////////////subject 6
a7 =
float
.Parse(comboBox20.Text);
b7 =
float
.Parse(textBox7.Text);
s7 = a7 * b7;
////////////////////////////////////////subject 7
a8 =
float
.Parse(comboBox22.Text);
b8 =
float
.Parse(textBox8.Text);
s8 = a8 * b8;
total = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8;
total_crdits = a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
/////////////////////////////////////////////////////////////////////////////subject 8
else
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked && checkBox7.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
////////////////////////
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
////////////////////////////
a4 =
float
.Parse(comboBox11.Text);
b4 =
float
.Parse(textBox4.Text);
s4 = a4 * b4;
/////////////////////////////
a5 =
float
.Parse(comboBox14.Text);
b5 =
float
.Parse(textBox5.Text);
s5 = a5 * b5;
///////////////////////////////
a6 =
float
.Parse(comboBox16.Text);
b6 =
float
.Parse(textBox6.Text);
s6 = a6 * b6;
///////////////////////////////
a7 =
float
.Parse(comboBox20.Text);
b7 =
float
.Parse(textBox7.Text);
s7 = a7 * b7;
///////////////////////////////
total = s1 + s2 + s3 + s4 + s5 + s6 + s7;
total_crdits = a1 + a2 + a3 + a4 + a5 + a6 + a7;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
///////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
////////////////////////
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
////////////////////////////
a4 =
float
.Parse(comboBox11.Text);
b4 =
float
.Parse(textBox4.Text);
s4 = a4 * b4;
/////////////////////////////
a5 =
float
.Parse(comboBox14.Text);
b5 =
float
.Parse(textBox5.Text);
s5 = a5 * b5;
///////////////////////////////
a6 =
float
.Parse(comboBox16.Text);
b6 =
float
.Parse(textBox6.Text);
s6 = a6 * b6;
///////////////////////////////
total = s1 + s2 + s3 + s4 + s5 + s6;
total_crdits = a1 + a2 + a3 + a4 + a5 + a6;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
////////////////////////
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
////////////////////////////
a4 =
float
.Parse(comboBox11.Text);
b4 =
float
.Parse(textBox4.Text);
s4 = a4 * b4;
/////////////////////////////
a5 =
float
.Parse(comboBox14.Text);
b5 =
float
.Parse(textBox5.Text);
s5 = a5 * b5;
///////////////////////////////
total = s1 + s2 + s3 + s4 + s5;
total_crdits = a1 + a2 + a3 + a4 + a5;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
/////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
////////////////////////
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
////////////////////////////
a4 =
float
.Parse(comboBox11.Text);
b4 =
float
.Parse(textBox4.Text);
s4 = a4 * b4;
/////////////////////////////
total = s1 + s2 + s3 + s4;
total_crdits = a1 + a2 + a3 + a4;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
/////////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked && checkBox2.Checked && checkBox3.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
////////////////////////
a3 =
float
.Parse(comboBox8.Text);
b3 =
float
.Parse(textBox3.Text);
s3 = a3 * b3;
////////////////////////////
total = s1 + s2 + s3;
total_crdits = a1 + a2 + a3;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
/////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked && checkBox2.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
////////////////////////
a2 =
float
.Parse(comboBox5.Text);
b2 =
float
.Parse(textBox2.Text);
s2 = a2 * b2;
//////////////////////
total = s1 + s2;
total_crdits = a1 + a2;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
else
if
(checkBox1.Checked) {
a1 =
float
.Parse(comboBox2.Text);
b1 =
float
.Parse(textBox1.Text);
s1 = a1 * b1;
total = s1;
total_crdits = a1;
gpa = total / total_crdits;
textBox17.Text = gpa.ToString();
}
///////////////////////////////////////////////////////////////////////////////////////////////
else
MessageBox.Show(
"Plz! Select the subjects."
);
}
private
void
comboBox5_SelectedIndexChanged(
object
sender, EventArgs e) {
}
private
void
check1() {
comboBox1.Enabled = checkBox1.Checked;
comboBox2.Enabled = checkBox1.Checked;
textBox1.Enabled = checkBox1.Checked;
textBox9.Enabled = checkBox1.Checked;
}
private
void
check2() {
comboBox4.Enabled = checkBox2.Checked;
comboBox5.Enabled = checkBox2.Checked;
textBox2.Enabled = checkBox2.Checked;
textBox10.Enabled = checkBox2.Checked;
}
private
void
check3() {
comboBox7.Enabled = checkBox3.Checked;
comboBox8.Enabled = checkBox3.Checked;
textBox3.Enabled = checkBox3.Checked;
textBox11.Enabled = checkBox3.Checked;
}
private
void
check4() {
comboBox10.Enabled = checkBox4.Checked;
comboBox11.Enabled = checkBox4.Checked;
textBox4.Enabled = checkBox4.Checked;
textBox12.Enabled = checkBox4.Checked;
}
private
void
check5() {
comboBox13.Enabled = checkBox5.Checked;
comboBox14.Enabled = checkBox5.Checked;
textBox5.Enabled = checkBox5.Checked;
textBox13.Enabled = checkBox5.Checked;
}
private
void
check6() {
comboBox17.Enabled = checkBox6.Checked;
comboBox16.Enabled = checkBox6.Checked;
textBox6.Enabled = checkBox6.Checked;
textBox14.Enabled = checkBox6.Checked;
}
private
void
check7() {
comboBox19.Enabled = checkBox7.Checked;
comboBox20.Enabled = checkBox7.Checked;
textBox7.Enabled = checkBox7.Checked;
textBox15.Enabled = checkBox7.Checked;
}
private
void
check8() {
comboBox24.Enabled = checkBox8.Checked;
comboBox22.Enabled = checkBox8.Checked;
textBox8.Enabled = checkBox8.Checked;
textBox16.Enabled = checkBox8.Checked;
}
private
void
checkBox1_CheckedChanged(
object
sender, EventArgs e) {
check1();
check2();
check3();
check4();
check5();
check6();
check7();
check8();
}
private
void
checkBox2_CheckedChanged(
object
sender, EventArgs e) {
check2();
}
private
void
checkBox3_CheckedChanged(
object
sender, EventArgs e) {
check3();
}
private
void
checkBox4_CheckedChanged(
object
sender, EventArgs e) {
check4();
}
private
void
checkBox5_CheckedChanged(
object
sender, EventArgs e) {
check5();
}
private
void
checkBox6_CheckedChanged(
object
sender, EventArgs e) {
check6();
}
private
void
checkBox7_CheckedChanged(
object
sender, EventArgs e) {
check7();
}
private
void
checkBox8_CheckedChanged(
object
sender, EventArgs e) {
check8();
}
private
void
textBox17_TextChanged(
object
sender, EventArgs e) {
}
private
void
comboBox11_SelectedIndexChanged(
object
sender, EventArgs e) {
}
}
}
calculate gpa
uog gpa calculator
gpa scale