I'm trying to write a program that will: 1. Asks the user for an odd integer, N, that is 7 or greater 2. Repeat step 1 until a valid input is entered 3. Print out a kite shape pattern that looks like this: http://ift.tt/1F5VDbF
I think I have the first two parts down, but I need help with the third part.
I know the third part include for loops, if loops, and else loops but I still need help.
This is what I have so far:
#include <iostream>
using namespace std;
int main () {
int N;
while (N<7 || ((N%2)==0)) {
cout << "Enter a odd number integer that is greater than 7";
cin >> N;
}
// this is the part where I would use for loops and other loops
If anyone can help me, Ill greatly appreciate it!!
Aucun commentaire:
Enregistrer un commentaire