Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

NAME : AHMAD SOLEHUDDIN BIN NIZAR

STUDENT ID : 2019252848
COURSE : CSC425

GROUP# : EC2203A1
ASSIGN# : ASSIGNMENT 2(TASK 1)
DUE DATE : 2/12/2020
PROGRAM DESCRIPTION :A PROGRAM TO DETERMINE THE AMOUNT OF
……………………………………………………………..SCHOLARSHIP A PERSON GETS PER YEAR BASED ON A
……………………………………………………………..PARTICULAR PROGRAM

LECTURER’S NAME : MISS NORHARZIANA BINTI YAHAYA RASHDI


/*

Name: Ahmad Solehuddin bin Nizar

Sid#: 2019252848

Course: CSC425

Group#: EC2203A1

Assign#: Assignment 2(Task 1)

Due Date: 2/12/2020

Program Description: A program to determine the amount of scholarship a person gets per
year based on a particular program

*/

#include<iostream>

#include<string>

using namespace std;

int main (){

// Variables

double cgpa;

char program;

// Welcome Messages

cout << "Welcome to Soleh's Scholarship Program!" << endl;

cout << "This process will help you determine the amount of scholarship you will get per
year based on your program and CGPA :) " << endl;

cout << "Goodluck and do not cheat! " << endl;

cout << endl;

// Input Statement

cout << "Please enter your Program (Diploma/Bachelor) using alphabet below: " << endl;
cout << "D for Diploma program " << endl;

cout << "B for Bachelor program " << endl;

cin >> program;

cout << "Now enter your CGPA: " << endl;

cin >> cgpa;

cout << endl;

// Output Statement

if (program=='D' or program=='d'){

cout << "You are in a Diploma program " << endl;

cout << endl;

if (cgpa < 3){

cout << "Congratulations! The amount of scholarship you will get per year is
: RM 5,000 " << endl;

cout << "Please use it as well as you can. Goodluck :)";

else if (cgpa > 3 && cgpa <=4){

cout << "Congratulations! The amount of scholarship you will get per year is
: RM 7,000 " << endl;

cout << "Please use it as well as you can. Goodluck :)";

else {

cout << "Ooops, I think that you have entered an incorrect value :) " << endl;

cout << "Please try again! " << endl;

else if (program=='B' or program=='b'){

cout << "You are in Bachelor program " << endl;

cout << endl;

if (cgpa < 3.3){


cout << "Congratulations! The amount of scholarship you will get per year is
: RM 6,000 " << endl;

cout << "Please use it as well as you can. Goodluck :)";

else if (cgpa > 3.3 && cgpa <=4){

cout << "Congratulations! The amount of scholarship you will get per year is
: RM 10,000 " << endl;

cout << "Please use it as well as you can. Goodluck :)";

else {

cout << "Ooops, I think that you have entered an incorrect value :) " << endl;

cout << "Please try again! " << endl;

else {

cout << "I think that u have entered an incorrect alphabet :) " << endl;

cout << "Please try again! ";

return 0;

}
Sample Input and Output

You might also like