Create a new project, and copy your
code from Task 1 to the new project
(copy the contents of the Main()
method and the displayDetails()
method)
Adapt your Main() method to capture
and display the details for 4 different
people.
The displayDetails() method
should remain unchanged.
Write a program that uses two parallel arrays to store student names and their grades. It should use an array of character that hold the names and array of character that hold the grades. The program should produce a report that displays list of student’s names and grades, and the name of the student that has the highest grade. The names and grades should be stored using an initialization list at the time the arrays are created. Use a loop and conditional statement to determine which student has the highest grade.
Write a program that creates and then reads a matrix of 4 rows and 4 columns of type int. while reading; the program should not accept values greater than 100. For any entered value greater than 100, the program should ask for input repeatedly. After reading all numbers, the system should find the largest number in the matrix and its location or index values. The program should print the largest number and its location (row and column).
write a program to perform the following task
a. prompt a user to enter three number of any data type (int or float)
b. create a function which accept three numbers
c. prompt a user to select the mathematic operation ( +, -, %, *, etc)
Display the result of the mathematic operation of the three numbers.
entered according to the user choice
sample output
Enter the Number
!st Number :37.5
2st Number :10;3rd Number ;20
please select operation
A: +, B|:-, C: *, D:% etc
operation: A
the summation of 37.5, 10, and 20 is 67.
5
Shivam is the youngest programmer in the world, he is just 12 years old. Shivam is learning programming and today he is writing his first program.
The task is very simple: given two integers A and B, write a program to add these two numbers and output it.
Write a C program to sort the digits of an integer in ascending and descending order using pointers.
Note:
Enter an integer
print the integer in ascending and descending order
For example:
Test Input Result
1 54387 34578
87543
Suppose that you have a computer with a memory unit of 24 bits per word. In this computer, the assembly program’s instruction set consists of 198 different operations.
All instructions have an operation code part (opcode) and an address part (allowing for only one address).
Each instruction is stored in one word of memory.
a. How many bits are needed for the opcode?
b. How many bits are left for the address part of the instruction?
c. How many additional instructions could be added to this instruction set without exceeding the assigned number of bits? Discuss and show your calculations.
d. What is the largest unsigned binary number that the address can hold?
b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program).
Instructions:
- Use “ORG” instruction to start your program at address equivalent to 25610.
- Use your last university ID number to input the value of X. For example, if your ID is1915161678234, then you will use the number 4 as the value of x.
- Do not forget to change the representation of the Input and Output windows in the simulator to Decimal.
a) 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)
N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it (not a screenshot!). Example: Subt One /Subtract 1 from AC
Sample input and output:
Example 1:
Input: 25
Output: 52
Example 2:
Input: 123
Output: 321
Example 3:
Input: 3
Output: 3