Create an algorithm that inputs sequences of two values Miles and Gals representing the mileage and gallons of gasoline at a succession of refills. The algorithm is to compute and output the immediate average miles-per-gallon (labeled Short for short range), and also the overall average mpg (since the beginning of the data), which is labeled Long for long range. A typical input-output sequence follows (and should end with negative mileage).INPUTS OUTPUTS
The grade point average of a student is computed from all the course grades G and units U. Corresponding to each grade is a numeric point P (where A has 4 points, B has 3 points, etc.). The products of each grade point and its number of units are then summed. This sum is divided by the total number of units, to yield the grade point average. Create an algorithm to compute the grade point average for a sequence of pairs of values G, U (ending with negative values).
Create an algorithm to analyze the speed during a trip of N stops. At each stop, the distance D and time T from the previous stop are recorded. These pairs of values are then input to a program which computes each velocity (V = D/T) and outputs it. It also ultimately indicates the maximum speed on the trip, and the overall average (total distance divided by total time).SAMPLE RUN (N = 5)
In some sports, a number of judges each ranks performance on a scale from 1 to 10. To adjust for biases, both the highest and lowest values are eliminated before computing the average. Create an algorithm to compute such an average for M judges on N performances.
Modify the program SidePlotXY of this Chapter as follows:a. Mark points on the axes.
Create an “upright” plot program, similar to the SidePlotXY program in this. Modify it as shown above.
Create a program to print out a calendar for a month, given the number of days in the month and the starting day of the week. Create a grid of horizontal lines and vertical lines.
Create a program to input a file of characters, to encrypt it for security purposes in such a way that it is not easily understandable and to output it to another file. Then create another program that reconverts the encrypted file and returns the original file. Your algorithm could a simple arithmetic function on the ASCII values or use a random number generator.
Modify the Flasher program of this chapter to keep track of the number of correct answers.
Create an algorithm to convert a sequence of binary input characters (not integers) into their corresponding decimal values. For example, 1101 is the decimal 13
One method for converting an Arabic number into a Roman number is to separately convert each digit (the units, tens, hundreds, and thousands positions) as shown.1 9 8 4
Write an algorithm that accepts as inputs any values up to 3999, and outputs the corresponding Roman numbers.
Pascal programming Related Interview Questions
|IBM Lotus Notes Interview Questions||Fortran Interview Questions|
|SQL Server 2008 Interview Questions||COBOL Interview Questions|
|IBM Lotus Domino Interview Questions||Dbase Interview Questions|
|MVC Framework Interview Questions||Delphi Interview Questions|
|Prolog Interview Questions||Lisp programming Interview Questions|
|Sql Server Dba Interview Questions||Asp Dot Net Mvc 4 Interview Questions|
|Object Oriented Analysis and Design Interview Questions|
Pascal Programming Tutorial
Computing: A Short Survey Of Some Applications
Programming Language: Pascal
Data And Actions
The Four Fundamental Forms In Pascal
Pascal With Bigger Blocks
Better Blocks: Procedures And Libraries
Pascal Data Structures
Algorithms To Run With
The Seven Step Method
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.