Compile your program into an executable called minicalc

Assignment Help Computer Engineering
Reference no: EM132196233

Write a C program 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. You should submit the source code, your Makefile and a screenshot of the output file.

Reference no: EM132196233

Questions Cloud

About the strategic advantages of different entry modes : In this assignment, you are required to write about the strategic advantages and disadvantages of different entry modes.
Develop recruitment and selection policies and procedures : BSBHRM506 Manage recruitment selection and induction processes - You will demonstrate your ability to develop recruitment and selection policies and procedures
Read sequence of positive integer numbers from the keyboard : Write a C++ program to read a sequence of positive integer numbers from the keyboard and save them in a list box called is 1stlnteger.
Prompt the user to input a length expressed in centimeters : The program should then convert the length to inches (to the nearest inch) and output the length expressed in yards, feet, and inches.
Compile your program into an executable called minicalc : Create a simple Makefile to compile your program into an executable called minicalc.
Measure marketing performance and productivity : issue a proposal to your CEO proposing that the company should commence the practice of measuring marketing performance and productivity
Computes the speed of the car in miles per hour : Write a C program which performs the operations like Assigns a value (425.5) representing the distance in miles traveled by a car.
Print the current directory and the name and size : Write a c# program that prints the current directory and the name and size of all files that are stored in the directory.
Create a file with your own name : Create a file with your own name. Store the followinh information on the created file

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the three rudimentary services provide by sms

As part of GSM, describe the three rudimentary services provide by SMS. When does SMS spoofing occur? Please describe a typical scenario.

  Define a function insert to insert a new binding

COMP 302 Programming Languages and Paradigms Assignment. Define a function insert to insert a new binding in the right place in the binding list. Define a function eval which evaluates expressions and returns options

  Are digital circuits immune to noise discuss your answer

Analog circuits are subject to noise that can distort their output. Are digital circuits immune to noise? Discuss your answer.

  Why oltp would be so desirable for use in atm systems

We noted during the discussion that banks were one of the earliest adopters of online transaction processing systems. Discuss why OLTP would be so desirable for use in ATM systems.

  Create a new program to prepare a sequence

Follow the steps of Allen-Bradley Programming Procedures to create the program demonstrated: A+,A-.

  How can we get around this problem given below

The arrayBagStack structure is in the .h file and therefore exposed to the users of the data structure. How can we get around this problem?

  A program to interpret the functional character

Write a C/C++ program to interpret the functional character (

  How can a company use change management to minimize

how can a company use change management to minimize resistance and maximize the acceptance of change in business and

  Discuss the distribution of the complex gaussian process

Circular symmetry criterion for a complex Gaussian process. Show that the distribution of the complex Gaussian process Z(t)ei? is invariant for all rotations.

  Implement a strategy that gives priority to actions

A states is partially explored if there exists an unexplored action. Implement a strategy that gives priority to actions that lead to interesting states.

  Questionthere was a sport in air craft on independence day

questionthere was a sport in air craft on independence day. on the air two aircrafts are in the air parallel to

  Data planning and enterprise modelling

Describe the major differences between two approaches for data planning and enterprise modelling and examine the integration? Why do these two methodologies usually produce several results?

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