A program that runs on ocelot for a mini calculator

Assignment Help Computer Engineering
Reference no: EM132196653

Question :

Write a C program that runs on ocelot for a mini calculator using only the command line options. You must use getopt to parse the command line.

Usage: minicalc [-a num] [-d num] [-m num] [-s num] [-e] value

• The variable value is the starting value.

• Value should be validated to be an integer between 1 and 99. Error message and usage shown if not.

• -a adds num to value.

• -d divides value by num.

• -m multiplies value by num.

• -s subtracts num from value.

• -e squares value. (Note: no num is needed.)

• Output should have exactly 2 decimal places no matter what the starting values are.

• If -e is included, it is executed first.

• Use standard order of operations for all operations.

Code should be nicely indented and commented. Create a simple Makefile to compile your program into an executable called minicalc.The Makefile should be called Makefile with no extension. I should be able to type make at the command line to compile your program.

Reference no: EM132196653

Questions Cloud

Test bench to perform row reduction on a matrix : Write a c program and test bench to perform row reduction on a 3 by 3 matrix and optimize to perform efficiently on the Zybo.
How do these assumptions influence the implications : How do these assumptions influence the implications and inferences you use in argument?
Simulate the operation of two of cpu scheduling methods : Write a C++ program to simulate the operation of two of CPU scheduling methods. Get the number of processes from the user.
Discusses any themes that relates to global business : Research and read objectively any academic article of your choice () that discusses any theme(s) that relate(s) to global business.
A program that runs on ocelot for a mini calculator : Write a C program that runs on ocelot for a mini calculator using only the command line options. You must use getopt to parse the command line.
Analysis divides on-hand inventory into three classes : The identification of parent items is called. ABC analysis divides on-hand inventory into three classes, generally based upon.
Develop a small application in flask : Develop a small application in Flask. The purpose of this application is to keep track of students that are enrolled in a class, and the score
Display the number of vowels in your name : Write a C program that stores your first name and your last name in separate arrays and counts and displays the number of vowels in your name.
Compare and contrast the two franchise agreements : Compare and contrast the two Franchise Agreements (Taste of Philly and Haagen Dazs) with respect to the contractual termination provisions.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How many element in the array is above the average

Write the void function generate(int N, in A[ ]) that generates and prints N numbers each between 12 and 83 inclusive.

  Specify modifications that implemented to it infrastructure

Identify any modifications that should be implemented to the IT infrastructure in order to accommodate the requirements of the EHR.

  Advantage and one disadvantage of virtual machine approach

Java and many other programming languages have taken approach of executing on a virtual machine, as opposed to compiling to native machine code.

  Discuss the immediate update recovery technique

Discuss the immediate update recovery technique in both single-user and multiuser environments. What are the advantages and disadvantages of immediate update?

  Write java gui program to update this file

Use java GUI JFileChooser to locate lab.txt from the file directory and use JTextArea to update the file.

  Suppose that the toolbar is named tbrcurrent

at last if the index of the button is two (2), then call the procedure named ExitSolution. Assume that the toolbar is named tbrCurrent.

  What is significance of other compiler dependent parameters

What is the significance of other compiler dependent parameters given in? (Again, consult your system documentation to find the location of float. h.)

  Identify each of the controls as physical or corrective

Suggest one or more controls to support each policy. Identify each of the controls as physical, administrative, or technical and preventative, detective.

  How could pdp augment memory in evaluating

How could PDP augment memory in evaluating the potential risk in this and other potentially threatening situations.

  Describe the operation of the hcs12s timer output

For an HCS12 operating at a clock frequency of 96MHz and prescalar value set to 32, 20000 ticks of TCNT will cause how much delay (in msec)?

  Create a program that displays all of numbers in the file

Create a program that displays all of numbers in the file

  Explain how the data will help you achieve project goals

Fully explain what [type] information or data you need to collect for the project and justify that the data will help you achieve you project's objectives.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd