Explore BrainMass


C Programming Help

C Programming Problem. I need help writing a program in C that meets the following criteria: 1) There are 5 products for sale at a grocery store ( I want to use cucumbers, lettuce, grapes, apples and bananas) 2) The five products are all sold by weight (pounds). 3) Customers need to be prompted to enter the price (per pound)

Help With C Programming

C programming. Let us consider a simple grocery store with just 5 products. Assume that all items are sold by weight. Select 5 vegetables to use in the program. Prompt the user to enter the price (i.e. price per pound) for each of the vegetables. A customer walks-in with an unusual request: He wants to know the maximum amount o

Multiple Choice, nine part question involving memory

Use the following to answer questions 1-1 and 1-2. Given the following memory values and a one-address machine with an accumulator, what values do the following instructions load into the accumulator? Word 20 contains 40. Word 30 contains 50. Word 40 contains 60. Word 60 contains 20. Register 1 contains 10. Register

Multiple choice, four part question involving binary computing

1-1 Binary code "000000000000000111111111100" represents A. 409910 B. 409310 C. 409410 D. 409210 E. none of the above is correct. 1-2 What is the 2's complement of F ? Wherein F = 2's complement of (2's complement of "11111101000001"): A. "100011110111110" B. "110110001000001" C. "0111000010000

Problem set

(See attached file for full problem description) --- 1. Analyze the following pseudocode. Whats the ansr's final value ? Num = 8 ansr =0 if num > 5 then if num < 20 then ansr =1 else ansr = 2 endif endif . A) 0 B) 1 C) 2 D) 7 2. Which piece of pseudocode represent the checking the loop condition A) rep = 1 (B) rep=r

Some exercises with Arrays

Arrays are collections of elements of the same type. The elements of the array can be accessed using their position (index) in the array. Arrays may have several dimensions: they can be similar to lists (1-dimension), matrices (2-dimensions), cubes (3-dimensions) etc. 1. The first exercise involves a 1-dimensional array of

Select (Medians and Order statistics)

Please review problem and verify the solution. problem --------- In the algorithm SELECT, the input elements are divided into groups of 5. Will the algorithm work in linear time if they are divided into groups of 7? Argue that SELECT does not run in linear time if groups of 3 are used. solution --------- Use groups o

Calculation and conversion of time given in hours, minutes and seconds

1- inputs a time duration in hours, minutes, and seconds; 2-calculates the equivalent total number of seconds; 3-recalculates the hours, minutes, and seconds from the total; 4-displays the values of the hours, minutes, seconds, and total seconds. Specific Requirements 1-The program must be otherwise formatted and docume

Microsoft excel

28. What is the first step that should be taken when creating a chart? A. providing a name for the chart B. selecting the chart type C. selcting the range of cells that contain the data the chart will use D. choosing the data labels that will be used on the chart 29. If you want to print only the chart in a worksheet, wh

Menu based Currency Conversion Program in C

Expand the "Currency Conversion" program to include a menu that allows the user to choose which currency he/she wishes to display in its equivalency to the US dollar. - Correctly use at least 1 function or subroutine Permit the user to input an amount to be converted into US Dollars. You may assume that a number is input. Y

C language compilers

There are at least two types of integers (short or long) and two types of decimals (float or double) in most C language compilers. We should write all the programs using longs and doubles without ever needing shorts or floats. What do you think was the idea of adding these two additional (smaller) types?

Files and Streams

Information about computer terminals in a computer network is maintained in a file. The terminals are numbered 1 through 100, and information about the nth terminal is stored in the nth line of the file. This information consists of a terminal type (string), the building in which it is located (string), the transmission rate (

Programming Problems (Selection)

Write a function convertLength() that receives a real value and two strings inUnits and outUnits, then converts the value given in inUnits to the equivalent metric value in outUnits and displays this value. The function should carry out the following conversions: inUnits outUnits I c

Using Classes is demonstrated.

Revernd Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c, and d be integers defined as follows: a = the number of a month of the year, with March = 1, April = 2, and so on, with January and February being counted as months 11 and 12 of the preceed

How to write C/C++ library functions for Time conversions?

Construct a library Time that contains the time-conversion functions (given a number of seconds, returns the equivalent number of minutes; given the number of minutes, returns the equivalent number of hours; given the number of hours, returns the equivalent number of days; given the number of seconds, returns the equivalent numb

Example of a Flow Chart and Written Specification of a C Program

I need an example of a flow chart and specification sheet of a C program. Here is an example of a C program: /*Currency conversion.*/ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <system.h> main () { /* Data Declaration statements*/ int Curr_type; float For_curr; float Equ_curr; pri

Its a mathematics problem used in Algorithm

See the attach file for problem. Please read R as R+ Question : Prove that ! ( ) n n ∈ο n by using the definition of the small o- notation. Definition: Let : N →R∪{0}, where ∫ N is the set of all non-negative integers: R is the set of all positive real numbers. f 0 0 o( f )={ g : N →R ∪{0}|∀c∈R,∃n

C programming: parameter passing

Need a C program that has a declaration in main () to store the following numbers into an array named rates:2.3,3.3,4.4,5.5,6.0. There should be a function call to show () that accepts rates in a parameter named rates and then displays the numbers using the pointer notation *(rates + i).

C Programming

I need to create a text file and then read it from my C program. I haven't a clue how to get started. The examples in my book do not work or either I'm doing something wrong.