Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

COS1512 assignment 2 solutions 2023 updated

Rating
-
Sold
8
Pages
14
Grade
A+
Uploaded on
03-07-2023
Written in
2022/2023

This document contains all of the codes to every question and output to the relevant questions that require the output. Recently coded so there's no plagiarism

Institution
Course

Content preview

COS1512 ASSIGNMENT 2 2023


QUESTION 1

#include <iostream>
using namespace std;
double calcFees(int nrModules,double fees)
{
return nrModules*fees;


}
double calcFees(int firstModule,double firstFees,int repModules,double repFees)
{


double total;
total=firstModule*firstFees+repModules*repFees;
return total;
}
int main()
{




char answer;
cout<<"Are you repeating any modules:Y\\N: ";
cin>>answer;
int firstModules;

, double firstFees;
if(answer=='Y')
{


double repFees;
int repModule;
cout<<"Enter the number of modules you are doing first time: ";
cin>>firstModules;
cout<<"Enter the fees for first time modules: ";
cin>>firstFees;
cout<<"Enter the number of modules you are repeating: ";
cin>>repModule;
cout<<"Enter the fees for modules repeated: ";
cin>>repFees;
cout<<"Your tuition fees are: R"<<calcFees(firstModules,firstFees,repModule,repFees);
}
else
{
cout<<"Enter the number of modules you are doing first time: ";
cin>>firstModules;
cout<<"Enter the fees for first time modules: ";
cin>>firstFees;
cout<<"Your tuition fees are: R"<<calcFees(firstModules,firstFees);


}
return 0;


}

Written for

Institution
Course

Document information

Uploaded on
July 3, 2023
Number of pages
14
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$12.62
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
ThinkLab University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
171
Member since
3 year
Number of followers
118
Documents
107
Last sold
8 months ago
ThinkLab Tutorials

A group of tutors that upload notes, exam elaborations, exam packs, assignment solutions and free packs. Unlock the door to academic excellence with our top-notch document uploads! It's meticulously prepared with foolproof solutions that guarantee your success. Trust in our reliable resources and conquer any challenge that comes your way. Don't settle for anything less than perfection in your studies. Our reliable document boasts 100% correct solutions, meticulously reviewed for your success. Say goodbye to uncertainty and hello to unwavering confidence! Giving the best services as the modules we are uploading are considered. If you have any questions, you're welcome to message us directly.

Read more Read less
4.0

20 reviews

5
8
4
5
3
6
2
1
1
0

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions