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

  Give appropriate to string methods for all classes

create a class Employee with a name and salary.give appropriate to String methods for all classes

  Write a program that simulates a lotto

Write a program that simulates a Lotto 6/49. The program should have an array of six integers named lottoNumbers.

  Be substantive and clear and use illustrations to reinforce

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

  What are important characteristics of a cryptographic key

What are two most important characteristics of a cryptographic key in determining the strength of a cryptographic system?

  Explain substantial benefits to the company

A medium sized company requires to upgrade the computer facilities for administrative and design and development applications. At the moment all computer-based applications are processed on a very cold 'Batch' machine whose operating system does n..

  Discuss about information systems security

Discuss one of the most important things you will take from this course (Information Systems Security). It is an opinion question.

  Explain the coding scheme used for encoding arabic alphabets

Explain the coding scheme used for encoding Arabic alphabets in the computer. Explain what it means that bitmapped image is device-dependent.

  What word and bit number are represented by given plc

Define the term byte. In a PLC-5, data file 5 is what type of file?

  Create an adt that contains a fixed-size array

Create an ADT that contains a fixed-size array that holds 20 integers (i.e., int array[20]; ) .

  Design an implementation of the sample-mode input functions

Design an implementation of the input functions for request mode. Design an implementation of the sample-mode input functions.

  Explain gothic and serif and san serif styles

Explain Gothic, Serif and San Serif styles. Give proper explanation of each of approximately one page each. Also attach the screenshot of each style.

  Describe the features of telecommunications networks

assume that you were recently hired by a manufacturing company as a systems administrator trainee. your first

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