Can you create desk checking tables for this algorithm:
Mainline Algorithm
Process_numeric_year
Prompt for year
Get Year
DOWHILE year NOT = 0000
Validate_year (year)
Set message to blank
Determine_leap_year (year, message)
IF message NOT = blank THEN
Display message
ENDIF
Prompt for year
Get year
ENDO
END
Validate_year (year)
Set year_valid to false
Repeat
IF year NOT numeric THEN
Display “year must be four numeric digits”
Prompt for year
Get year
ELSE
IF year NOT = four digits THEN
Display “year must be four numeric digits”
Prompt for year
Get year
ELSE
Set year_valid to true
ENDIF
ENDIF
UNTIL year_valid = true
END
Determine_leap_year (year, message)
Divide Year by 4
IF remainder (year/400 = 0
Status = true
ELSE
If remainder (year/4) = 0 AND remainder (year/100) NOT = 0
Status = true
ELSE
Status = False
ENDIF
ENDIF
END
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
Can you create desk checking tables for this algorithm: Mainline Algorithm Process_numeric_year Prompt for year...
I need help with a project, I’ve seen many answers in C++, but
i need it to be in swift, thank you!
Write a program that asks the user to enter a date (e.g. July 4, 2008) and will return the day of the week that corresponds to that date. Your program should take the input in numeric form, thus the input prompt should be as follows: Please enter a date below: Enter month (1-12): Enter day (1-31) Enter year...
Can anyone help me with rewriting my pseudocode? Below is the pseudocode, and after that is the completed program. Pseudocode: DISPLAY Login information PROMPT for username/password output "Enter Username" input userName output "Enter password: " input password //If successful, display information pertaining to the specific user, as well as prompt for logout IF User type 'quit' Exit Program VALIDATE User Credentials IF NOT Validated Check number of Invalid Attempts IF user attempts equal three THEN DISPLAY error message...
Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to convert (a String) Accept that String Prompt the user for the value of the initial base (an integer) Accept that integer Prompt the user for the desired base of the output (an integer) Accept that integer If the String is not a legal expression of a number in the initial base, display an error message and exit the...
ATM Class Write an ATM class to test your Account Class. The ATM class will prompt for a user name, if there is no account with that user name it will prompt out an error statement and start over. If there is an account with that user name, then it will prompt the user for a password. If the password does not match the user name then another error message and the program will restart and prompt for another user...
import java.util.*; /** Description: This program determines the average of a list of (nonnegative) exam scores. Repeats for more exams until the user says to stop. Input: Numbers, sum, answer Output: Displays program description Displays instruction for user Displays average Algorithm: 1. START 2. Declare variables sum, numberOf Students, nextNumber, answer 3. Display welcome message and program description 4. DOWHILE user wants to continue 5. Display instructions on how to use the program 6. Inititalize sum and number of student...
In this question, you will test, using a backtracking algorithm, if a mouse can escape from a rectangular maze. To ensure consistency of design, start your solution with maze_start.c. The backtracking algorithm helps the mouse by systematically trying all the routes through the maze until it either finds the escape hatch or exhausts all possible routes (and concludes that the mouse is trapped in the maze). If the backtracking algorithm finds a dead end, it retraces its path until it...
IP requirements: Load an exam Take an exam Show exam results Quit Choice 1: No functionality change. Load the exam based upon the user's prompt for an exam file. Choice 2: The program should display a single question at a time and prompt the user for an answer. Based upon the answer, it should track the score based upon a successful answer. Once a user answers the question, it should also display the correct answer with an appropriate message (e.g.,...
YOU MUST NOT MAKE ANY CHANGES TO THAT CODE package edu.buffalo.cse116; /** * Class that can be used to test if two integers are coprime. Numbers are considered coprime iff the largest divisor * shared by both numbers is 1. Identifying coprime (also called relatively prime) numbers is valuable for RSA public * key cryptography (and possibly other things, but the author has never seen any other uses). */ public class CoprimeNumbers { /** * Given two integers, this returns...
Lab 7 Add three instance variables to your class RightTriangle from lab 5. The first two are of type int and are called xLoc and yLoc and the third is of type int called ID. Also add a static variable of type double called scaleFactor. This should be initialized to a default value of 1. Update the constructor to set the three new instance variables and add appropriate get and set methods for the four new variables. All set methods...