Write an assembly program using MARIE's assembly Instruction set that prompts the user to enter a non-negative integer that is less than 10. The program should include a subroutine that keeps prompting until a valid value is obtained. When a valid number is entered, it will be displayed. (Hint: Use JNS & JUMPI instructions to implement the subroutine)
I need a code that will print all possible combinations and permutations of an array of words (eg. "alpha", "beta", "delta").
The code should be such that it permutates each line from the result of the combination, where 'r' will be the number of elements that will be selected at a time from the array.
Program to find the total salary by hand of an Employee
Class 1 Get basic pay, deduction, and bonus from the console.
Class 2 Calculate hra (5% of basic pay) and pf (20% of basic pay).
Class 3 Find the total salary (basicpay+hra-pf-deduction+bonus) and get the salary slip
Salary slip should contains :- basic pay, deduction, hra, pf, bonus and total salary by hand.
Using practical examples, describe green computing. List and explain the steps that you can
take to contribute to green computing.
A function that returns an int can only use int parameters.
True
False
When a function ends, the local variable and parameter variables are destroyed.
True
False
Only one value may be returned from a function.
True
False
Look at the following code and identify what is wrong with it:
void multiply(int, int);
int main() {
std::cout << "The answer is: " << multiply(num1, num2);
}
void multiply(int a, int b) {
return a * b;
}
Prototype is missing variable names.
Int parameters should be doubles.
Void functions cannot return a value.
Value-returning functions must be called in a statement that stores the returned value in a variable.
A function with a(n) ___ return type can either return true or false values.
Void
Binary
Bool
Static
Which of the following is NOT one of the reasons why global variables may be a bad idea (according to your author)?
A variable in main() with the same name as a global variable causes compiler and runtime errors.
Global variables make a program hard to understand.
Global variables make debugging difficult.
If you want to use a function in another program and this function depends on a global variable, you will have to redesign it.