(Write in C++)
Write a program that reads in two numbers and, if the
input is...
(Write in C++)
Write a program that reads in two numbers and, if the
input is valid, outputs 2 times the product of the integers that
lie between the two values (including the values themselves). If
either number is not an integer, or if the first number is not less
than the second number, just output an error message. The sample
runs below should give the idea. User inputs are in bold. Important
Notes: Your program should use a loop...
Please write the code
in Python.
Write a
program/function in any Object-Oriented programming language that
will...
Please write the code
in Python.
Write a
program/function in any Object-Oriented programming language that
will implement Queue Abstract Data Type with the following
functions/methods. Any build-in/pre-defined Queue
function/library (e.g., java.util.Queue in Java) is
NOT allowed to use in your code.
push(Element): insert the
input Element (e.g., String or Integer in Java) to the end
of the queue.
pop(): remove
the head element of the queue and print the head element on
screen.
count(): return the total number of
elements in the queue...
Write a C++ program to read a positive integer greater than 0,
the program should compute...
Write a C++ program to read a positive integer greater than 0,
the program should compute and display the following:
- Sum of odd digits in the number
- Count of even digits in the number
- The smallest digit.
For example, if the input is 24536, then
Sum of odd digits in the number = 8
Count of even digits in the number = 3
Smallest digit = 2
IN C++ PLEASE.
Write a program where the user enters a number and you output an...
IN C++ PLEASE.
Write a program where the user enters a number and you output an
unfilled square of stars. (DO NOT PROMPT THE USER, just take in a
number, The only console output should be the squares). For example
the program would start with console input,
The user would enters 3, you would output (note 3 is the lowest
number your program will be tested with)
***
* *
***
or, The user enters 5, you would output
*****...
Draw a flowchart for a computer program to receive 40 numbers
and output “yes” if number...
Draw a flowchart for a computer program to receive 40 numbers
and output “yes” if number of negative values among the first 10
inputs is equal to number of positive values among the last 10
inputs. Note. The 20 numbers in middle are ignored. For instance,
if the values are:
1,-1,1,1,-1,1,-2,5,1,1,4,4,5,-6,5,8,-12,0,2,0,1,2,3,7,7,-7,0,1,1,1,3,4,1,-1,-1,-1,-1,-1,-1,-1
the program should output “yes” since the number of negative values
in the first 10 numbers is 3, and the number of positive values in
the last 10 numbers...