Course Solutions Uncategorized (Solved) : First Statement Im Trying Iterate Pname 0 Run Enter Ages Else Run Enter Age 1 Age Runs X T Q38012900 . . . .

(Solved) : First Statement Im Trying Iterate Pname 0 Run Enter Ages Else Run Enter Age 1 Age Runs X T Q38012900 . . . .

 

In my first if statement, Im trying to iterate, if pName > 0,then run “enter the ages” else run “Enter the age” (for only 1age)

//Runs X times(consticted by pAmount) obtaining name(s) andage(s)
   for (int i = 0; i < pAmount; i++)
   {
       cout << “Enter thename(s):”;
       getline(cin, pName);

       if (pName > 1)
       {
           cout <<“Enter the age:”;
           cin >>age;
          cin.ignore();
       }
       else
       {
           cout <<“Enter the age:”;
           cin >>age;
          cin.ignore();
       }

       p[i].setName(pName);  //Saves names in array
       p[i].setAge(age);      //Saves the ages in

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Please Reference Zvi Lempel Zip Compression Algorithm Apply Text Thedogisabigdog Demonstra Q27398572 . . . .(Solved) : Please Reference Zvi Lempel Zip Compression Algorithm Apply Text Thedogisabigdog Demonstra Q27398572 . . . .

<p>Please reference the <strong>Zvi-Lempel ZIP COMPRESSIONALGORITHM,</strong> and apply it to the text:<em><strong>“thedogisabigdog”</strong></em></p><p>THen demonstrate what the representation for the repeated codes(only show the final representation where the compressedrepresentation is being used,