Hello! I have this question on Zybooks where I have to reorder the lines of code in order to get it to work. I'm posting the instructions with a screenshot. I'm completely lost. Arrange the following lines to make a program that determines when the number of people in a restaurant equals or exceeds 10 occupants. The program continually gets the number of people entering or leaving the restaurant. Ex: 2 means two people entered, and -3 means three people left. After each input, the program outputs the number of people in the restaurant. Once the number of people in the restaurant equals or exceeds 10, the program exits. If an InputMismatchException exception occurs, the program should get and discard a single string from input. Ex: The input "2 abc 8" should result in 10 occupants. Not all lines are used in the solution.
Instructions Write a one-line program to output the following haiku. Keep in mind that for a one-line program, only one print command is used. Moon and stars wonder where have all the people gone alone in hiding. - Albrecht Classen. Hint: Remember that the escape sequences \n and \t can be used to create new lines or tabs for extra spacing.
Does anyone know c++? I have c++ to java, if you can please help me convert the following. #include #include #include int main(int argc, char* argv[]) { std::cout << " 1st\t 2nd\t Tot.\t Ave.\n+-------------------------------+\n"; double first, _first=0, second, _second=0; srand(time(NULL)); int amount = (rand() % 10000)+1000; int _amount = amount; while(amount>0) { first = (rand() % 6)+1; _first+=first; second = (rand() % 6)+1; _second+=second; std::cout << " " << int(first) << "\t " << int(second) << "\t " << int(first+second) << "\t " << std::fixed << std::setprecision(2) << (first+second)/2 << std::endl; amount--; } std::cout << "\n\nFirst Average: " << _first/double(_amount) << "\nSecond Average: " << _second/_amount << "\nAverage Total: " << (_first+_second)/double(_amount)<< "\nTotal Attempts: " << _amount << std::endl; return 0; }
Design a program which, from a data entered by keyboard with the format Day, Month, Year, the date of the following day is obtained
What line of code will change the color of myCar to purple? O myCar = color('purple') myCar.changeColor('purple') OmyCar.changeColor(self, 'purple') O myCar changeColor = 'purple'
Salma is working on the game mechanics section of her Game Design Document. Specifically, she is trying to explain how things will collide, move, and interact with each other. What core mechanics item is Salma working on? A. physics B. economy C. movement D. combat
It is not necessary to describe how characters interact with the game state when composing a GDD. True False
When it comes to how much investors pay for the development of a game, it is important that they ensure it will not exceed what? A. the amount they spent on the last game investment they made B. the amount they pay the design team C. the amount they bring in from selling the game D. the amount it costs to market the game
Marie Coolidge is a new employee, she has five years of experience in a similar job where she was paid 45000 65000 she has four years of higher education her current salary will be 55000
Instructions You should see the following code in your programming environment: import simplegui def draw_handler (canvas): frame = simplegui.create_frame('Testing', 600, 600) frame.set_canvas_background("white") frame.set_draw_handler(draw_handler) frame.start() Use the code above to write a program that draws a target. Your program should create an image similar to the one- I