Answered You can hire a professional tutor to get the answer.

QUESTION

de string using namespace std; int main() { int num; string name; char again = 'Y'; while(again == 'y' || again == 'Y'){ cout "What is your name?...

#include <iostream>

#include <string>

using namespace std;

int main()

{

 int num;

 string name;

 char again = 'Y';

 while(again == 'y' || again == 'Y'){

  cout << "What is your name? n";

    cin >> name;

  cout << name << ". Enter your number: ";

    cin >> num;

    //ask user for an number

          if (num != 0)

    {

      if (num % 2 == 0)

      {

        cout << ((num = 0) ? "Even and positive n" : "Even and negative n");

      }

      else

      {

        cout << ((num = 0) ? "Odd and positive n" : "Odd and negative n");

      }

    }

    else

    {

      cout << "The number is zero n";

    }

  cout <<name<< ", do you want to go again? (Y/N)";

  }

cout << "Thank you. Have a good day! n";

   return 0;

  }

It breaks at the loop and I cant figure out where I went wrong!

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question