Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- // Code that loops through an array of sports:
- string Sports[2][4] = {
- {"football", "basketball", "lawn tennis", "Table tennis"},
- {"ice hockey", "badminton","Swimming", "bull riding"}
- };
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 4; j++) {
- cout << Sports[i][j] << "\n";
- }
- }
- // Code that prints my name: "President Emmanuel":
- int (name);
- switch (7) {
- case 1:
- cout << "Ethanol";
- break;
- case 2:
- cout << "Solocord";
- break;
- case 3:
- cout << "Pixie";
- break;
- case 4:
- cout << "Kevin";
- break;
- case 5:
- cout << "Sir Von Cawingthon";
- break;
- case 6:
- cout << "Dav";
- break;
- case 7:
- cout << "President Emmanuel";
- break;
- case 8:
- cout << "arcxion";
- break;
- case 9:
- cout << "Jabit";
- break;
- case 10:
- cout << "deepforce";
- break;
- }
- // Code that finds the division of two numbers << "\n";
- int x,y;
- int division;
- cout << "Type a number: " << "\n";
- cin >> x;
- cout << "Type another number: " << "\n";
- cin >> y;
- division = x / y;
- cout << division << "\n";
- // Code that asks you for your football club and prints it out:
- string club;
- string result;
- cout << "What is your football club: " << "\n";
- cin >> club;
- cout << "This is your club: " << club << "\n";
- cin >> result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement