Explore BrainMass

Explore BrainMass

    C++

    BrainMass Solutions Available for Instant Download

    Code for reading Raster Data (Resubmit)

    Dear Champake Mendis, MEngSc (IP), Many thanks for your reply, but I would like to resubmit. Please note that I have segmented my character as (10x10) pixels number plates 8-bit. When I used the code provided by Bill Green, TEST.bmp 20 row by 20 column BMP image, I found the right and expected result. However, when I tried

    Code for reading Raster Data

    'A project on Number plates; I have successfully implemented a method for character localisation, character segmentation and character recognition. Main problem at the moment is to find a method capable of reading raster data and print it to file. Have segmented characters into a 10x10 pixels, 8-bit(Bitmap) black

    C++ Programming: Arrays and Strings

    Write a C++ program that declares an array alpha of 50 components of the type double. Initialize the array so that the first 25 components are equal to the square of the index variable and the last 25 components are equal to three times the index variable. Output the array so that 10 elements per line are printed.

    C++ Programming (Arrays and Strings)

    See attach file. F) Consider the following declaration: int beta[3][3]; What is stored in beta after each of the following statements executes? 2. for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) beta[i][j] = i + j; Ans: 3. for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) beta[i][j] = i * j; Ans

    C++ Programming

    Write a program that reads a student's name together with his or her test scores. The program should then compute the average test scores for each student and assign the appropriate grade. The grade scale is as follows: 90-100, A; 80-89, B; 70-79, C; 60-69, D; 0-59, F. Your program must use the following functions

    C++ Programming (User Defined Functions)

    3. Consider the following statements: double num1, num2, num3; int int1, int2, int3; int value; num1 = 5.0; num2 = 6.0; num3 = 3.0; int1 = 4; int2 = 7; int3 = 8; and the function prototype: double cube(double a, double b, double c); Which of the following statements are valid? If they are invalid, explain why.

    C++ program cpp file and the executable file

    1. It is not necessary to name your formal and corresponding actual parameters the same. What are the benefits of doing so? 2. Write a value-returning function that returns the sum of two numbers. Then write the code to produce the same outcome using a void function and passing variables by reference. In what situations

    Coding rules explanation and use of Sequential file access

    1. Discuss why naming conventions are important and why programmers should consistently follow them. Include in this discussion problems that could arise in naming variables if one convention is not followed. 2. Why is it important to consistently follow coding rules and techniques? What are the pitfalls of not doing so?

    Examples of use of cout in C++

    15. What is the output of the following statements? Suppose a and b are int variables, c is a double variable, and a = 13, b = 5, and c = 17.5. a. cout <<a + b - c << endl; = 0.5 b. cout << 15 / 2 + c << endl; = 25 c. cout << a / static_cast<double>(b) + 2 * c << endl; = 37 d. cout << 14 % 3 + 6.3 + b / a << endl; =

    How to declare or use Variables in C++ ?

    Which of the following variable declarations are correct? If a variable declaration is not correct give the reason(s) and provide the correct variable declaration. n = 12; //Line 1 char letter = ; //Line 2 int one = 5, two; //Line 3 double x, y, z; //Line 4 Line 3 and 4 are correct but what is

    C++ Programming: Example Problem

    Suppose a, b, and c denote the lengths of the sides of a triangle. Then the area of the triangle can be calculated using the formula: √s(s - a)(s - b)(s - c), Where s = (1/2)(a + b + c). Design an algorithm that uses this formula to find the area of a triangle. What information do you need to find the area?

    Basic Elements of C++

    1. Discuss the importance of defining the problem and what can happen if the problem is not defined properly. Note that in class problems will be defined, however in the business world a great deal of time would need to be devoted to properly defining the problem (in terms of input and output) so everyone has a clear under

    Writing a Program to Read the Lengths

    Write a program to read the lengths of the two legs of a right triangle and to calculate and display the area of the triangle (one-half the product of the legs) and the length of the hypotenuse (square root of the sum of the square of the legs).

    Introduction to C++

    Write a constant declaration to associate MPH with the integer 55 in proper syntax.

    C++ output payroll report

    Repeatedly prompt the user to determine whether or not there is data pertaining to an employee to be input. (Program should work for 0 or more employees.) If the user responds in the affirmative, the program prompts for each of the input data items for a single employee; the user responds in the negative when there is no more

    C++ programming-Function

    Max is a function that accepts two int parameters and returns the value of the larger one. Four int variables, p1, p2, p3, and p4 have already been declared and initialized. Write an expression (not a statement!) whose value is the largest of p1, p2, p3, and p4 by calling max. Call max three times and you will need to pass the

    Write a Function Definition Called Reverse

    Write a function definition called reverse, with two parameters, the first is an array of integer and the second is the number of elements in the array. The function reverses the elements of the array and does not return a value.

    Backward C++ Programming-Function

    Write a function definition called backward, with three parameters, the first and second parameters are arrays of integers of equal size and the third is an integer indicating the size of each array. The function will return true when and only if one of the array is reverse order of the other, that is having the same elements bu

    Write a function definition called addarray

    Write a function definition called addarray that takes two parameters- one an array as an int and the other an int that contains the number of elements of the array. The function will return the sum of the number of elements of the array as int.

    Writing a simple C++ PROGRAM (Practice)

    Consider a simple textual table describing the catalogues of retail stores, with a line for each product offered by a store, like Argos Barbie 6.99 Argos PS2 159.99 Hamleys Barbie 16.99 Each line consists of three words: a vendor code, a product code and the price of that product from that vendor (a floating

    C++ text centering help compiling finding errors

    I have attached a lab assignment and a html document with c++ code to solve the problem (which i got from another TA) but I can seem to get it to run when it complies it returns errors. I got it down to one error by putting int MAX = 60; under the main functin and taking the .h off iostream etc. but still had one error and not

    C++ Text centering

    I have attachd a lab.......I have not done this in awhile so I need to know what to do for this lab. I do not need the whole code written; I can do that, but I just need to know what to do. I know arrays, classes and pointers..etc I do not need that explained I have just never read in from a text and centered before.

    C++ Code to Find and Replace Line by Line in a Text File

    I am having a difficult time getting started generating a C++ code for this function. char *ism_repallfile(const char *szin, const char *sztarget, const char *str, const char *sub) This is what the code is supposed to do: Takes a text file, szin opens it in line_by_line. For each line, it replaces any occurrences of str wi

    Cantilever Beam Deflection

    A problem is needed using microsoft visual C++ to do the following. Problem Description: For your strength of materials course you wilii write a single program using control structures(including nested loops)and file I/O to explore the deflection of a cantilever beam with a point load at the free end. This is to be on the