100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

COS1512 ASSIGNMENT 2 SOLUTIONS 09 JULY 2023

Puntuación
-
Vendido
-
Páginas
16
Grado
A+
Subido en
09-07-2023
Escrito en
2022/2023

COS1512 ASSIGNMENT 2 SOLUTIONS 09 JULY 2023

Institución
Grado










Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
9 de julio de 2023
Número de páginas
16
Escrito en
2022/2023
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

COS1512 ASSIGNMENT 2
SOLUTIONS 09 JULY 2023

written by

primenovice




www.stuvia.com



Downloaded by: ramaanoemmanuel | Want to earn
Distribution of this document is illegal R13,625 per year?

, Stuvia.com - The study-notes marketplace




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;



Downloaded by: ramaanoemmanuel | Want to earn
Distribution of this document is illegal R13,625 per year?

, Stuvia.com - The study-notes marketplace




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;


}




Downloaded by: ramaanoemmanuel | Want to earn
Distribution of this document is illegal R13,625 per year?
$9.13
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
ramaanoemmanuel

Conoce al vendedor

Seller avatar
ramaanoemmanuel COS2614
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
2 año
Número de seguidores
0
Documentos
2
Última venta
-

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes