100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

COS1511 Assignment 2 Year 2023 Solutions + Output + Explaination

Rating
-
Sold
2
Pages
18
Uploaded on
23-05-2023
Written in
2022/2023

Complete Solutions to COS1511 Assignment 2 for the year 2023. Includes Code, Output of run-time, and Explaination. Feel free to contact us should you have any queries

Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
May 23, 2023
Number of pages
18
Written in
2022/2023
Type
Other
Person
Unknown

Subjects

Content preview

Question 1a:
Code:

#include <iostream>
using namespace std;

int main() {
int age;
float finalMark;

cout << "Enter age: ";
cin >> age;
cout << "Enter final mark for exam: ";
cin >> finalMark;

while (age >= 30 || finalMark <= 65) {
cout << "Candidate does not qualify. ";

if (age >= 30)
cout << "Age should be younger than 30. ";

if (finalMark <= 65)
cout << "Final mark should be greater than 65%. ";

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

cout << "Enter age: ";
cin >> age;
cout << "Enter final mark for exam: ";
cin >> finalMark;
}

cout << "Candidate qualifies for the internship." << endl;

return 0;
}

Output:

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Learn2Progress Learn2Progress
Follow You need to be logged in order to follow users or courses
Sold
75
Member since
3 year
Number of followers
63
Documents
15
Last sold
1 year ago

4.6

5 reviews

5
4
4
0
3
1
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions