Calculate display the area of a rectangle (length * width)

Assignment Help Programming Languages
Reference no: EM13166956

Use the input.txt file. Have it read in the number of records to work on. Then for each record read in a character. If it is a C then read in a value and calculate and display the area of a circle (pi*r2), a R then read in two values and calculate and display the area of a rectangle (length * width), and if it is a T then read in two values and calculate and display the area of a triangle (1/2 * base * height).

Data file to test with:

5

C 13

R 7 9

C 5

T 12 10

R 23 8

 

 

Reference no: EM13166956

Questions Cloud

A text file students.txt contains student records : A text file students.txt contains student records (name, date of birth, and GPA). Write a program that reads student records from students.txt and creates an array of student structures
Write a program that has user enter : Write a program that has user enter a sentence and then determine how many lower case letter were entered. You need to write a logically coherent function that will determine if character is lower case or not. Main will also display the total?
The computerization of health records : A health care issue that has been in the news lately is the computerization of health records. This probability is being approached cautiously because of sensitive privacy and security concerns, among others.
Make an instance of romannumerals : Make an instance of RomanNumerals and invoke the method toRoman(int n). Enter a number in the Arabic notation and it will convert it to a Roman numeral. For example 17 will be converted to XVII.You will notice a test suite that we provide with the..
Calculate display the area of a rectangle (length * width) : Use the input.txt file. Have it read in the number of records to work on. Then for each record read in a character. If it is a C then read in a value and calculate and display the area of a circle (pi*r 2 ), a R then read in two values and calculate ..
Your program will read the array : Your program will read the array from the file, check the diagonal and print a report containing the size and the status of the diagonal. A typical report would look like: The matrix is 3x3 and all the numbers on the main diagonal are the same.
Create a data flow diagram : Create a data flow diagram for Online library management system. It should include search, hold, add items, issue, recall, and add user. It should support books, dvds, and cds. The flows should include each data element, the levels must be balance..
A local department store hires you to write : A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout line can only accept five items for any one purchase. Design a program that asks for the price of each item, and then displays..
The conversion must be done in a function : The conversion must be done in a function. The function will accept the pressure in bars and return both atmospheres and psi. Your script should continue to prompt the user to see if they wish to another calculation.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create class uses element array of digits to store integers

Create a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods input, output, add and subtract.

  Program-debug and test programming project

Use Visual Basic .Net 2010 to program, debug, and test the following programming project. Modify the Lucky Seven game to present the user with a video poker hand (5 card).

  Write program uses while loop to output all odd numbers

Write a program that uses while loop to perform the following steps: Output all the odd numbers between firstnum and secondnum inclusive.

  What is the break -even point for upgrades

What is break -even point for the upgrades? that is , what price would we require to charge for CPU (or disk -change only one) so result was the same cost per 1% increase for both?

  Write statement to call calculate interest method

Write the statement(s) necessary to call the calculate interest method with an account balance of $2300.00 and an interest rate of 5%.

  Create logic for program to enter each household size

Create logic for a program that allows a user to enter each household size and find out the mean and median household size in Marengo.

  Write a shell script to read from the keyboard

Write a shell script called poject. 21 to read from the keyboard and display on the monitor first name, last name and age if the age is less than 50. If the age is greater than 50, it will display your are over 5 instead of the age.

  Scripting language programming in perl

course Scripting Language Programming,  Assignment   -  Perl,  ? Your coding style should conform to general Perl coding conventions. Your scripts should be clean, neat, and well-formatted (e.g. indention). Identifiers should also be properly name..

  Write a program that exploit string library functions

Write a program that exploit string library functions to do the following: -prompt the user to enter his name (of four parts) -count the number of characters in his name (excluding the white spaces).

  Perform a paired t-test to verify your claim

Which type of t-test is most appropriate to investigate your co-investigator's claim? Why is it most appropriate t- test? Please explain your answer in 1-2 lines.

  Create mock level design for game

Write a 5-page "mock level design" in which you design a level for a game. The game is a shooter, the level is an old warehouse filled with zombies and demons with a boss at the end.

  Wilkerson-irwin algorithm to minimize mean tardiness

Write a program to implement the Wilkerson-Irwin algorithm to minimize mean tardiness.

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