first semester files
This commit is contained in:
26
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-1ASharpe.cpp
Executable file
26
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-1ASharpe.cpp
Executable file
@@ -0,0 +1,26 @@
|
||||
/***************************************************************
|
||||
* Name: Aidan Sharpe
|
||||
* Course: Computer Science & Programming
|
||||
* Class: CS04103 Section: 2
|
||||
* Assignment Date: 9/15/2021
|
||||
* File Name: Lab01-1ASharpe.cpp
|
||||
*****************************************************************
|
||||
* ID: Lab 1 Problem 1
|
||||
* Purpose: Print the value of paychecks with given pay periods and salary
|
||||
*****************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
const int ANNUAL_PAY = 39000, TWICE_MONTHLY = 24, BI_WEEKLY = 26;
|
||||
|
||||
//Print paycheck value with both twice monthly payment and bi-weekly payment
|
||||
cout << endl << "Paycheck value at $" << ANNUAL_PAY << " per year with " << TWICE_MONTHLY << " paychecks per year: $" << ( ANNUAL_PAY / TWICE_MONTHLY ) << endl
|
||||
<< "Paycheck value at $" << ANNUAL_PAY << " per year with " << BI_WEEKLY << " paychecks per year: $" << ( ANNUAL_PAY / BI_WEEKLY ) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
BIN
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-1ASharpe.exe
Executable file
BIN
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-1ASharpe.exe
Executable file
Binary file not shown.
27
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-2ASharpe.cpp
Executable file
27
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-2ASharpe.cpp
Executable file
@@ -0,0 +1,27 @@
|
||||
/***************************************************************
|
||||
* Name: Aidan Sharpe
|
||||
* Course: Computer Science & Programming
|
||||
* Class: CS04103 Section: 2
|
||||
* Assignment Date: 9/15/2021
|
||||
* File Name: Lab01-2ASharpe.cpp
|
||||
*****************************************************************
|
||||
* ID: Lab 1 Problem 2
|
||||
* Purpose: Calculate how many energy drinks and citrus drinks are being consumed out of a set of customers
|
||||
*****************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
const int CUSTOMERS = 16500;
|
||||
const float ENERGY_PERCENT = 0.15, CITRUS_PERCENT = 0.52;
|
||||
|
||||
//Calculate the number of customers that got energy drinks and the number that got citrus drinks
|
||||
cout << endl << "Out of " << CUSTOMERS << " customers: about " << int( ENERGY_PERCENT * CUSTOMERS ) << " had an energy drink, "
|
||||
<< "and about " << int( CITRUS_PERCENT * CUSTOMERS ) << " had a citrus drink." << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
BIN
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-2ASharpe.exe
Executable file
BIN
1st-Semester-Fall-2021/CSNP/CSNP-04103-Lab-#1/Lab01-2ASharpe.exe
Executable file
Binary file not shown.
Reference in New Issue
Block a user