S

@Shaun_2020

C++ Code 7

C++
2 years ago
#include <iostream> using namespace std; int main() { int choice = 2; cout << "Enter a choice 1, 2, 3, or 4:"; cin >> choice;

C++ Code 6

C++
2 years ago
#include <iostream> using namespace std; int main() { string name_1 = "Mark"; string name_2 = "Mary"; if (name_1 > name_2)

C++ Code 5

C++
2 years ago
#include <iostream> using namespace std; int main() { int num_1 = -27; if (num_1 >= -50 && num_1 <= 150) {

C++ Code 4

C++
2 years ago
#include <iostream> using namespace std; int main() { int num_1 = 55; if (num_1 >= 0 && num_1 <= 100) {

C++ Code 3

C++
2 years ago
#include <iostream> using namespace std; int main() { int num_1 = 55; if (num_1 >= 0 && num_1 <= 100) {

C++ Code 2

C++
2 years ago
#include <iostream> using namespace std; int main() { int amount_1 = 11; int amount_2 = 22; if (amount_1 > 10) {

C++ 1st Code

C++
2 years ago
#include <iostream> using namespace std; int main() { const int SALES_1 = 10000, SALES_2 = 15000; const double COMMISSION_1 = .10,

C++ Secret Password Do-While Loop

C++
2 years ago
#include <iostream> using namespace std; int main() { // Example of a do-while loop to repeatedly ask for a password until correct

C++ Multiplication Table While Loop

C++
2 years ago
#include <iostream> using namespace std; int main() { // Example of a while loop to print a multiplication table int num = 5, i = 1; cout << "Enter a number to print its multiplication table: ";

Haywire Slot Machine III With 1X To 5X The Normal Payout - No Endless Loop

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h>

Computer password security II

C
2 years ago
#include <stdio.h> int main() { printf("\nWelcome To Mr. Lock system: "); const int correctPassword = 2005; int password; int maxAttempts = 3;

Compound Interest Calculator II

C
2 years ago
#include <stdio.h> #include <math.h> int main() { float principal, rate, time, CI;

Craps Game II

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> int rollDie() { return rand() % 6 + 1;

Haywire Slot Machine II With 1X To 5X Normal Payout

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> char generateSymbol() { char symbols[] = {'A', 'B', 'C', 'D', 'E'}; int index = rand() % 5; return symbols[index];

Haywire Slot Machine With 1X To 5X The Normal Payout

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> // Function to generate a random symbol for a reel char generateSymbol() { char symbols[] = {'A', 'B', 'C', 'D', 'E'}; int index = rand() % 5;

Texas Hold Em

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #define NUM_PLAYERS 2 #define NUM_CARDS 5 typedef struct { int value; char suit;

Craps Game

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> // Function to roll a six-sided die int rollDie() { return rand() % 6 + 1; }

Blackjack II

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> // Function to draw a card int drawCard() { return rand() % 10 + 1; // Cards are numbered 1 to 10 } // Function to calculate the total value of a hand

Blackjack I

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> // Function to draw a card int drawCard() { return rand() % 10 + 1; // Cards are numbered 1 to 10 } // Function to calculate the total value of a hand

Slot Machine

C
2 years ago
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> // Function to simulate a slot machine spin void spinSlotMachine(int *symbol1, int *symbol2, int *symbol3) { *symbol1 = rand() % 3 + 1; // Symbol 1 can be 1, 2, or 3