0% found this document useful (0 votes)
19 views7 pages

Emd2m2c - Lab Assignment 2

CSC430

Uploaded by

Asyiqin Sanusi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views7 pages

Emd2m2c - Lab Assignment 2

CSC430

Uploaded by

Asyiqin Sanusi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

COMPUTER PROGRAMMING AND

APPLICATIONS
(CSC430)

LAB ASSIGNMENT 2
(Topic 3-5%)

Prepared By:
Name: Nur Asyiqin Sanusi
Student ID: 2022495422
Group: EMD2M2C
Program Code: CEEM222
Program Name: Bachelor of Mechanical Engineering with Honours
Faculty Name: School of Mechanical Engineering

Prepared For: MISS HAFIZATUL HANIN HAMZAH

Assigned date: 10 MAY 2023


Submission date: 18 MAY 2023
QUESTION
Yayasan Setia Bakti is giving scholarships to students of public and private universities
starting from their second semester of study. The scholarships amount to be given will
be based on the following table:

In order to qualify for scholarships, diploma students must have a CGPA of least 3.30
and bachelor students must have a CGPA of at least 3.0. The parents or guardians of
the students must have a total yearly income of not more than RM50000.

Write a program that asks for the type of study, CGPA, length of study (in semester)
and parents’ yearly income to determine whether a student qualifies for scholarships or
not. For the student that qualifies, display the total amount of scholarship that he will
receive from Yayasan Setia Bakti.
CODING

/* Nur Asyiqin Sanusi


CSC430 lab Assignment 2
2022495422
EMD2M2C*/
#include<iostream>
using namespace std;
int main()
{
int TypeStudy, SemPeriod, AmountSch, TtlSch;
float CGPA, ParentsIncome;

cout<<"\n\t\tYAYASAN SETIA BAKTI SCHOLARSHIPS" <<endl;


cout<<"\t\t--------------------------------" <<endl<<endl;
cout<<"\t\t-----------------------------------\n";
cout<<"\t\t(1) Diploma at public university \n\t\t(2) Bachelor at public university";
cout<<"\n\t\t(3) Diploma at private university \n\t\t(4) Bachelor at private university";
cout<<"\n\t\t-----------------------------------";
cout<<"\n\nEnter type of study: ";
cin>>TypeStudy;

cout<<"Enter CGPA: ";


cin>>CGPA;

cout<<"Enter semester period (from 2nd semester): ";


cin>>SemPeriod;

cout<<"Enter parents yearly income: RM";


cin>>ParentsIncome;

if((CGPA>=3.30 && ParentsIncome<50000) && TypeStudy==1)


{
cout<<"\nYOU ARE ACCEPTED FOR SCHOLARSHIP! ^-^";
AmountSch=2000;
}
else if((CGPA>=3.00 && ParentsIncome<50000) && TypeStudy==2)
{
cout<<"\nYOU ARE ACCEPTED FOR SCHOLARSHIP! ^-^";
AmountSch=3500;
}
else if((CGPA>=3.30 && ParentsIncome<50000) && TypeStudy==3)
{
cout<<"\nYOU ARE ACCEPTED FOR SCHOLARSHIP! ^-^";
AmountSch=3000;
}
else if((CGPA>=3.00 && ParentsIncome<50000) && TypeStudy==4)
{
cout<<"\nYOU ARE ACCEPTED FOR SCHOLARSHIP! ^-^";
AmountSch=4500;
}
else
{
cout<<"\nYOU ARE NOT ACCEPTED FOR SCHOLARSHIP! :(";
}

cout<<"\n\nTotal amount received for scholarship: RM"<< AmountSch*SemPeriod;

return 0;
}
CODING SCREENSHOT
OUTPUT SCREEN
RUBRICS

QUESTION NO 1 (SOURCE CODES)

Input Statement 3

Output Statement 5

Process 8

Structure of 2
Codes

(pre-processor,
comments,
declaration
variables, good
styles)

Output Screen 2

Total 20

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy