UNIX/Linux Programming Answers

Questions: 89

Answers by our Experts: 89

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

You need to submit the code and program output.

 

Q1. you will write a C++ program that uses a for statement to calculate and display the sum of all even numbers between 5 and 24 inclusive on the screen.


Q2. Write statements that assign random integers to the variable n in the following ranges: Use the random function to generate the numbers. Put the statements in a C++ Program and run it.


a) 1 ≤ n ≤ 87 


b) 1 ≤ n ≤ 925 


c) 0 ≤ n ≤ 424 


d) 2000 ≤ n ≤ 3138


e) –16 ≤ n ≤ 65




You need to submit the code and program output

Q1. you will write a program that uses a for statement to calculate and display the sum of all odd numbers between 6 and 27 inclusive on the screen. 


Q2. Write statements that assign random integers to the variable n in the following ranges: Use the random function to generate the numbers. Put the statements in a C++  Program and run it.


  1. a) 1 ≤ n ≤ 54
  2. b) 1 ≤ n ≤ 910
  3. c) 0 ≤ n ≤ 194
  4. d) 1000 ≤ n ≤ 3125
  5. e) –19 ≤ n ≤ 31

 Boyce earns P35.00 per hour at his job. What would be his annual income be if he works 8 hours per day, 5 days per week, and 50 weeks per year? Write a script to support you answer, the script should prompt a user to enter his\her hourly rate, number of hours per day, number of days per week and number of weeks per year. Then the system computes the annual income [10 marks] 


  1. What is the Difference between MOV AH, 2 and MOV AH, 1
  2. What is the Purpose of "LEA" and MOV AH, 9

Create an Assembly Language Program with the following arithmetic operations.

a.) 2+2-3+1*2-2 = 2

b.) 5-1*2+1-7*2 = 4


Write Linux Shell script to check whether a sample file is readable, writable, and executable


Write Linux Shell script to display current working directory.  


Write Linux Shell script to display current date and time  


Develop a stopwatch with lap counter and total time calculator. The

program will create two processes and they will start calculating time.

One process will be used to calculate total time and the other will calculate

lap time. The total time calculator process will keep on calculating time.

In the lap time, calculator process when it reaches lap time limit, the

process will display lap number and set its counter to zero and start

calculating again. Take input of lap time and number of laps from the user

and start the program. At the end, display total time from total time

calculator process.


Develop a stopwatch with lap counter and total time calculator. The

program will create two processes and they will start calculating time.

One process will be used to calculate total time and the other will calculate

lap time. The total time calculator process will keep on calculating time.

In the lap time, calculator process when it reaches lap time limit, the

process will display lap number and set its counter to zero and start

calculating again. Take input of lap time and number of laps from the user

and start the program. At the end, display total time from total time

calculator process.


LATEST TUTORIALS
APPROVED BY CLIENTS