[i have problems ... i need solution if you know ..and sory]

This is a discussion on [i have problems ... i need solution if you know ..and sory] within the C++ Programming forums, part of the General Programming Boards category; Code: hallo ever body i have these problems which i could not able to solve it if any one can ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    4

    Post [i have problems ... i need solution if you know ..and sory]

    Code:
    hallo ever body i have these problems which i could not able to solve it 
    if any one can help me     i than him or her..
    
    
    
    Exercise 1 (w = 1.5 points). Write a C++ program with two arrays of size 11: Array1 and Array2. Each array contains integer numbers randomly generated (see lab 7 for random number generation in C++). A third array of the same size is called Result and should contain the result of an arithmetic operation performed on Array1 and Array2 as follows:
     if the index is even then the value stored in that element is the sum of the numbers in the same index in Array1 and Array2
     if the index is odd then the value stored in that element is the product of the numbers in the same index in Array1 and Array2.
    The program should then print the values in the three arrays where each array is separated by a line. The output should look like this:
    Array1: 5 6 3 0 7 5 3 11 2 6 12
    Array2: -3 11 2 52 8 19 7 2 3 7 3
    Result: 2 66 5 0 15 95 10 22 5 42 15
    
    
    Exercise 2 (w = 3 points). Write a C++ program that has an array of integers. The maximum size of the array is 100. The program should ask the user to enter the number of elements to be stored in the array, then the program should ask the user to enter that many numbers to be stored in the array as they are entered. The program should call a function (putInOrder) to rearrange the numbers stored in the array such that they are stored in the array in increasing order. The function putInOrder takes as input the address of the array and the number of elements in the array.
    
    
    Exercise 3 (w = 2 points). Assume that enum Grade = {A, B, C, D, F} is an enumerated data type that represents grades in a course. Write a C++ program that reads a list of students IDís and grades, finds the frequency of each grade in the file, and stores that frequency in an array of 5 integers. Use the Grade data type to loop through the array.
    
    
    Exercise 5. Write a C++ program that reads a list of 9 strings into an array of strings. The program should allow the user to choose two positions whose content will be swapped. The program should have a function called swap that takes as input an array and two locations in the array and swaps the contents of the two locations. The program should check the positions selected by the user and should not pass to the function swap any locations out of the array boundaries. If the user enters a location not within the array the program should display an error message to the user and asks the user to re-enter the position until correct input is given.
    2
    
    Exercise 6 . (w = 2 points). Write a C++ program that generates a new user ID from an array of 7 strings called IDs. Initially, the IDs are read from the user via the keyboard. The new ID is generated by calling a function generateNew which attaches the old ID to the prefix e followed by the index of the old ID. For example, given the array contents:9654
    1011
    3333
    1324
    7788
    1325
    2256
    The new array contents are:
    e02256 e11325
    e27788
    e31324
    e43333
    e51011
    e69654
    The program should display the new contents of the array at the end.
    Last edited by alsawafi4a; 04-26-2011 at 05:30 AM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,555
    Yeah, the first problem being that you can't see threads such as
    Forum Guidelines. Read before posting

    or
    Homework

    Dumping your assignment without any effort on your part doesn't count.

    Make an effort, then we can explain what you don't understand.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    4
    ok if you can solve Exercise 2 please.....

  4. #4
    Registered User
    Join Date
    Apr 2011
    Posts
    4
    please please please

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,555
    Why?

    The world doesn't care whether you pass or fail, and you're not going to get a free pass from this site simply from begging others to do your homework.

    We're here to educate and inform, not be your pack-mule because you find the going a bit too tough.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Apr 2011
    Posts
    4
    thans

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need solution on....
    By bongo147 in forum C Programming
    Replies: 4
    Last Post: 07-30-2009, 08:21 AM
  2. Need the best solution
    By ginom71 in forum C Programming
    Replies: 11
    Last Post: 07-03-2009, 02:51 PM
  3. K&R solution?
    By deadhippo in forum C Programming
    Replies: 12
    Last Post: 05-09-2008, 06:36 AM
  4. Recursive Solution to Any Maze And Stack Overflow Problems
    By PunkyBunny300 in forum C Programming
    Replies: 14
    Last Post: 12-14-2002, 06:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21