Write a program that determines if an integer (input by the user) is odd or even.

The program should also include functions that:
1) Determine if an even number is greater then 1000
2) Determine if an odd number is less then or equal to 199.

The program should display (output) the results.

Remember to include a function that displays your name and email address.

if anyone can pull this off that would be greatly appreciated

Recommended Answers

All 5 Replies

Homework -- we don't do people's homework. You write and ask questions -- we answer them.

> Remember to include a function that displays your name and email address.
If I put "George W Bush" and president@whitehouse.gov, would you be smart enough to change it before handing it in?

> if anyone can pull this off that would be greatly appreciated
Pretty much everyone except you so far. But that's not the point, for the reason AD already stated.

I'm assuming that you already did the homework to read your name and age, and print them back out. How about modifying that slightly, since that covers the input side of your assignment at least.

Or did you sponge those answers off someone else and are thus now totally clueless. If so, just give up the course now to save everyone's time - programming isn't for you.

Im trying to write a while loop program that says a person can give a certain number of high fives, but then they must give a low five. Im terrible with C++ i could use some help

#include<iostream>
using namespace std;

int main()
{
int highFive;
int x = 1;
int lowFive;

while ( x < 7)

{
x = highFive

while (highFive > 0)

{    
cout << "high five:" << highFive << endl;
}
printf("give a low five"./n)

return 0;

}
Member Avatar for iamthwee

Draw yourself a flow chart.

#include<iostream>
using namespace std;

int main()
{
    int highFive = someRandomGarbage, initialise it!;
    int x = 1;
    int lowFive = someRandomGarbage, initialise it!;

    while ( x < 7)
    {
        x = highFive  Missing ;

        while (highFive > 0)
        {    
            cout << "high five:" << highFive << endl;
            Perhaps some input here?
            Well something needs to get you out of the loop
        }
        printf("give a low five"./n)
        Stick with cout in C++, drop the printf, it's wrong

        return 0;
        Not so much a while, as a once!
    }
} Missing

Some annotations for you to ponder on your code listing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.