Q1 ) What is wrong with the following if statement (there are at least 3 errors). The indentation indicates the desired behavior. (Check it either manually or by writing the whole code in a C++ source file in a complete C++ program)
if numNeighbors >= 3 || numNeighbors = 4
++numNeighbors;
cout << "You are dead!" << endl;
else
--numNeighbors;
Question2:
Write if statements to do the following:
Ø If character variable tax Code is ’T’, increase price by adding the taxRate per-centage of price to it.
Ø If integer variable opCode has the value 1, read in or input double values for X and Y and
calculate and print their sum.
Ø If integer variable test is even or odd.
Ø If integer variable current Number is odd, change its value so that it is now 3
times currentNumber plus 1, otherwise change its value so that it is now half of
currentNumber
Ø If integer variable Number is multiple of 3 or not
Ø Assign 1 to the integer variable leapyYear if the integer variable year is a
leap year. (A leap year is a multiple of 4, and if it is a multiple of 100, it must
also be a multiple of 400.)
Ø Assign a value to double variable cost depending on the value of integer variable
Hey man, without reading your post; and being da genius that i am, Ive successfully found the answer to your stupid question. I even checked with my dog and he said it was correct.
So here is the answer big hoss:
If you simply do this -
int main{}
before the whole thing...
so it will go like this-
#innude <iosdream>
int sain{}
there ya go big boy! Problem solved!
Hope you have a good Easter man... happy haunakkah too...
Peace out bruh
@ Xieni,
it seems like you are the most idiot here because you think that you are genius and others are stupid. You were not born in a paper full of c++ code, I am sure you had to ask many people when you just started learning, and many of those people thought that some of your questions were naïve, but they wouldn't offend you like you are offending a person who is asking for assistance.
You better go and find a family to adopt you and raise you well because it seems like you not raised the correct way a normal person should be.
Hey Saydi,
Try to write your code and if it does not compile for you or if you having any kind of issue with it you can post it here and many people are going to be happy to assist and tell you what's wrong with it, because I think nobody can write the program for you from scratch, and you don't want to have another idiot like Xieni talk crap to you :)