Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Lecture02.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std; // First cool thing about using the solution-project system. You don't need to remember these lines. Just look at an old homework.
- int main()
- {
- int size; //since i'm dealing with size and values, i have to say int: etc; in the beginning"
- int value; // use ; after stating your ints
- cout << "Enter size " << endl; // my first input is size so i make a cout and cin for it
- cin >> size; // use ; after endl and cin
- if (size == 4 || size == 6 || size == 8 || size == 10 || size || 12 || size || 20) {
- }
- else if (size != 4 && size != 6 && size != 8 && size != 10 && size != 12 && size != 20) {
- cout << ("That's not a size, I'll use 6") << endl;
- size = 6; // my first if deals with size, aka my input. use {} for cout that follows if. use {} for cout that follows else
- }
- cout << "Enter value" << endl;
- cin >> value;
- if (value < 0 || value >= size) {
- cout << ("Too high, just use 1") << endl;
- value = 1;
- }
- if (size == 4 || size == 8 || size == 20) {
- cout << " * " << endl;
- cout << " * * " << endl;
- cout << " * " << value << " * " << endl;
- cout << "*********" << endl;
- }
- else if (size == 6) {
- cout << "*********" << endl;
- cout << "* *" << endl;
- cout << "* " << value << " *" << endl;
- cout << "* *" << endl;
- cout << "*********" << endl;
- }
- else if (size == 10) {
- cout << ("Kite") << value << endl;
- }
- else if (size == 12) {
- cout << ("Pentagon") << value << endl;
- }
- cin >> value;
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement