complete a pseudocode for the program specifications be sure to
declare the contants and it contains...
complete a pseudocode for the program specifications be sure to
declare the contants and it contains only 1 if-else statement
You need a program that will calculate the cost of movie
tickets. Input will consist of the customer’s name and age. The
output is to consist of the customer’s name and ticket cost. If the
age is 12 or less, the ticket cost is $5.00. If the age is over 12,
the ticket cost is $8.95.
Solutions
Expert Solution
The pseudocode is as below:-
The implementation of the
pseudocode in java is as follows:-
The corresponding output for
the two cases when age<=12 & age>12 are as below:-
complete a pseudocode for the program specifications be sure to
declare the contants and it contains only 1 if-else statement
you need a program that will calculate the net pay for the
employees. Input consists of the employee’s first name, employee’s
last name, hourly pay rate, hours worked. The gross pay is based on
the hours worked. If the hours worked is over 40, then the overtime
pay is one and a half times the hourly pay rate for all...
assume that the following pseudocode is executed in a
program
module main
declare x = 1
declare sum = 0
declare max = 5
while ( x < max)
Display "x is ", x
set x = x + 1
set sum = s + x
end while
end module
after the execution of this program the final value of
x is_____ and the final value of sum is_____
Rewrite your program for part 1. Do not declare the array
globally, declare it in the loop function. This now requires that
you add two parameters to your fill array and print array
functions. You must now pass the array name and array size as
arguments, when the program calls these functions. The program has
the same behavior as problem 1, but illustrates the difference
between globally and locally declared variables.
The program code for part 1 was:
int Array[15]...
Design c++ program so that it correctly meets the program
specifications given below.
Specifications:
Create a menu-driven program that finds and displays areas of 3
different objects.
The menu should have the following 4 choices:
1 -- square
2 -- circle
3 -- right triangle
4 -- quit
If the user selects choice 1, the program should find the area
of a square.
If the user selects choice 2, the program should find the area
of a circle.
If the...
C++ Program
1. Declare an integer static array a[ ] with 100 elements.
2. Declare an integer pointer p.
3. Let p pointing to the array a[ ].
4. Use p (you have to use p) to put 0 into the first element of
this array, 2 into the second element, 4 into the 3rd element, 6
into the 4th element, ... 198 into the 100th element of this
array.
5. Use a (you have to use a) to display...
write pseudocode for the following problems not c
code
Pseudocode only
Write a C program to print all natural numbers from 1
to n. - using while loop
Write a C program to print all natural numbers in
reverse (from n to 1). - using while loop
Write a C program to print all alphabets from a to z.
- using while loop
Write a C program to print all even numbers between 1
to 100. - using while loop...
C Program and pseudocode for this problem.
Write a C program that plays the game of "Guess the number" as
the following: Your program choose the number to be guessed by
selecting an integer at random in the rang of 1 to 1000. The
program then asks the use to guess the number. If the player's
guess is incorrect, your program should loop until the player
finally gets the number right. Your program keeps telling the
player "Too High" or...
4. PROPOSED SOLUTION (PSEUDOCODE)
• Start.
• Initialize the clear cycle=1 and part[2],generated=0.
• Declare the parts of the car as ‘engine’, ‘chassis’, ‘ss’.
• Initialize the semaphore sem t ready.
• Assign the ids from 0 to 3.
• Declare the function void * gen branch(void*arg) which generates
the assembly
branch.
• In the above function declare i,j,k=0 .
• Repeat the step 7 until while(1).
• Declare sleep(1) so that when the loop runs the next time it...
In the same file, complete the following exercises in the
author’s pseudocode as presented in the
text book and material on Blackboard in this chapter, and following
all requirements for good
program design that were shown in Chapter 2 and all examples since
then.
At the Summer Olympic Games every four years, for historical
reasons, athletes represent
National Olympic Committees (NOCs) rather than strictly countries.
For the sake of convenience
in our program, let us refer to them simply as...
C++
Vectors.
Create a program do the following in the program:
1. declare an vector without specifying the size
2. use push_back to add random integers between 100 and 999 to
the vector
3. write a function that returns the smallest, largest,
and average of the numbers in the vector
display the smallest, largest, and average of the
numbers in the vector