T

@thomascutler

3.3 RESEARCH | Unit 3 Project: Playing Card Shorthand Decipher

C++
6 months ago
#include <iostream> #include <map> #include <string> int main() { std::map<std::string, std::string> value_map{ {"A", "Ace"}, {"2", "Two"}, {"3", "Three"}, {"4", "Four"}, {"5", "Five"},

3.2d Before or After

C++
6 months ago
#include <iostream> #include <string> using namespace std; int main() { int timeuno; cin >> timeuno; string suffixuno;

3.2c Who's the Winner?

C++
6 months ago
#include <iostream> using namespace std; int main() { int score_a; cin >> score_a; cout << "Score A: " << score_a; int score_b;

3.2b Integer Input Check

C++
6 months ago
#include <iostream> using namespace std; int main() { cout << "Enter an integer: \n"; int firstnumber; cin >> firstnumber; if (!cin) { cout << "Invalid input \n"; return 0;

3.2a Exactly One Zero

C++
6 months ago
#include <iostream> using namespace std; int main() { cout << "Enter x: \n"; int x; cin >> x; cout << "Enter y: \n";

3.2 Logical operators

C++
6 months ago
#include <iostream> #include <string> int main() { int age = 25; std::string user_role = "user"; int score = 85; int passing_threshold = 70; int distinction_threshold = 90;

3.1e Picture Orientation

C++
6 months ago
#include <iostream> using namespace std; int main() { int width, height; cin >> width; cout << "Width: " << width << endl; cin >> height;

3.1d Time Reader

C++
6 months ago
#include <iostream> #include <string> using namespace std; int main() { int hour; cout << "Enter an integer for hour and a suffix (am/pm): "; cin >> hour; if (cin.fail()) {

3.1c Month Validator

C++
6 months ago
#include <iostream> using namespace std; int main() { cout << "Enter an integer for the month (January = 1, February = 2, etc.): "; int month; cin >> month; if (month >= 1 && month <= 12) { cout << "\n" << month << " is a valid month." << endl; } else {

3.1b fizzbuzz

C++
6 months ago
#include <iostream> using namespace std; int main() { cout << "Enter a number: "; int funnumber; cin >> funnumber; if (funnumber % 3 == 0 && funnumber % 5 == 0) { cout << "fizzbuzz" << endl; } else if (funnumber % 3 == 0) {

3.1a Matching cards

C++
6 months ago
#include <iostream using namespace std; int main() { cout << "Enter first card: "; string firstcard; string of; string firstsuit; cin >> firstcard >> of >> firstsuit;

2.3 Easter Research

C++
6 months ago
#include <iostream> int calculateEaster(int year) { int a = year % 19; int b = year / 100; int c = year % 100; int d = b / 4; int e = b % 4; int f = (b + 8) / 25; int g = (b - f + 1) / 3; int h = (19 * a + b - d - g + 15) % 30;

2.2c Parse File Path

C++
6 months ago
#include <iostream> #include <string> using namespace std; int main() { std::string drive, path, file, extension; std::cin >> drive; std::cout << "Drive letter: "<< drive <<"\n"; std::cin >> path; std::cout << "File path: "<< path <<"\n";

2.2b Monogram

C++
6 months ago
#include <iostream> #include <string> using namespace std; int main() { cout << "Enter your first, middle, and last name (seperated by Space):"; string first; string middle; string last;

2.2a Table of Prices

C++
6 months ago
#include <iomanip> #include <iostream> using namespace std; int main() { double price; cin >> price; cout << "Unit price: " << price <<"\n";

2.1c Display Powers

C++
6 months ago
#include <iostream> #include <cmath> using namespace std; int main() { double num = 7; double square = num*num; double cube = square*num;

2.1b Display Dimensions

C++
6 months ago
#include <iostream> using namespace std; int main() { double width = 8.5; double height = 11; double mm = 25.4;

2.1a Area of Rectangle

C++
6 months ago
#include <iostream> using namespace std; int main() { // Other values will be set during testing. // Your program needs to work with any width and height. double width = 10;

1.3a Initials

C++
7 months ago
#include <iostream> int main() { std::cout << "TTTTT CCC" << std::endl; std::cout << " T C C" << std::endl; std::cout << " T C " << std::endl; std::cout << " T C " << std::endl; std::cout << " T C " << std::endl; std::cout << " T C C" << std::endl; std::cout << " T CCC" << std::endl;

1.2b tree and bush

C++
7 months ago
#include <iostream> using namespace std; int main() { cout << " o " << endl; cout << " oooo " << endl; cout << " ooooooo " << endl; cout << " oooooooo " << endl;