![]() Using nested fors, print an hours and minutes table, of the form:Ġ0:00 00:01 00:02.If a negative number is encountered mid-way, the program should terminate, and print the sum so far. The negative one is not to form part of the sum. Input a series of positive (>=0) numbers, ended by a negative one.Print the total of the following numbers. (eg the input might be: 4 33 52 67 83 - where the count is 4) Input a count, which specifies how many numbers will follow it.Look at the pseudocode example for playing monopoly look also at the link for one person's move, now using these rules: Write pseudocode to calculate the average age of people in a class. 8 MOD 5 = 3.(ie 8 divided by 5 has 3 'leftover'). Hint in computing, the MODULO function will return the remainder after dividing one number by another. Write pseudocode to determine if an integer (number) number is odd or even. Write pseudocode to take two integers from a user and display the sum and the product (ie the number are multiplied together) of the numbers. Input 10 numbers, and print their total - but any numbers>100 should be ignored, i.e should not be summed.Input 10 numbers, and print their total.(use for) BUT if start is bigger than finish, swap over their values so they are now in the proper order, then print the integers as specified. Input 2 values into the variables: start and finish, then print the integers from start to finish inclusive.BUT, if start is bigger than finish, don't print the numbers: an error message instead!.Print the numbers 1 to 100 inclusive with a for loop.Print the numbers 1 to 100 inclusive- with a while loop.Simple (Perhaps slightly more difficult!) Problems #2 Write an algorithm to solve this problem. The automatic barrier will prevent display appropriate full messages if the spaces are taken. Input 3 numbers, and print the biggest.Īnother car park has 200 places for cars and 30 for motorcyles.Input 3 numbers and print either an "all 3 equal" or a "not all equal" message.Produce an error message if the length is negative. Input the length of the side of a square, and print its area.Input the dimensions of a rectangle and print area and perimeter. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |