Thread: Paypal for C program

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

    Paypal for C program

    Willing to give $20-30 paypal for whoever can write this functioning program in C ~




    Create a program that presents and implements the following:

    Menu
    -Store data into 3 one-dimensional arrays each to hold 5 positive numbers(floats)
    (use a function to process one array at a time)
    provide a error check routine to insure only valid numbers are entered

    -Print all arrays: array name, index and the values

    -Compute the average
    (use a function to process one array at a time)
    print the results from main()

    -Compute and pring the average of all numbers
    (use the previous function in the solution)

    -Locate and print the largest value in each array
    (use a function to process one array)

    -Print the largest value from all the numbers

    -Clear the arrays

    -Loop until the user is done

    At the end, print the number of requests processed.
    Note: The user may request the operations in any order


    ----------------------------------------------------------------------

    Criteria- What needs to exactly be inside the program

    Documentation:

    At the start of the program with /*

    input/process/output
    Main steps listed
    Descriptive variable names
    Code comments

    */

    Functions:
    -Present a menu
    -Input array data
    **Array is an input/output parameter
    **Numeric input verified(error checked)

    -Print array data.
    **Array is an input parameter
    **Printout is orderly

    -Find the largest number in an array
    **Array is an input parameter
    **Largest AND position is returned

    -Clear an array(reset to zero)
    **Array is an input parameter


    *~* In Main() *~*

    Control loop: structured,clear

    Process all requests, prints errors with reasonable error messages

    Computes & prints the largest from all
    Computes & prints the Grand Average
    Records & Prints the requests processed

    Execution
    Compiles without error
    Correct operation & answers
    Clarity & Organization.




    Please let me know if you're interested, The source code should be sent Via private message.

    Thanks ~ Rainhawk ~

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Nope sorry... not nearly enough zeros on that offer.

    CLICK THIS --> Homework Policy For This Forum
    Last edited by CommonTater; 04-05-2011 at 04:09 PM.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Do us all a favor and drop your class/major. We don't need more slackers in the workplace.

  4. #4
    Registered User
    Join Date
    Apr 2011
    Posts
    3
    Quote Originally Posted by rags_to_riches View Post
    Do us all a favor and drop your class/major. We don't need more slackers in the workplace.
    you want 200-300 for a 150 line program :x? I understand there might have been a no homework policy and quite positive there are gonna be trolls that get offended here.

    I fell behind in class due to personal problems and haven't been able to catch up w/ the class. at this point i'm just trying to pass it. i don't plan on puruseing a career in programming so there's not a need to worry. I'm not asking anyone to do this for free or trying to bum this off someone. but if there's anyone with some spare time and can do it that's cool.

    No need to tell anyone they're a slacker because you have no idea how that person is in real life. Anyway........... yeah.

  5. #5
    THANK YOU KINDLY SIR Phenax's Avatar
    Join Date
    Mar 2011
    Posts
    74
    Well,

    I'm sure there are at least a few individuals here willing to help you understand and solve your problem. What are you going to do on your final exam? You can't pay someone to take that for you, unfortunately.
    First of all, Do you understand functions, loops (while, for, do), and other control statements (if, switch)? Do you understand arrays?

    I'll be happy to attempt to help you, if that's the case please try to explain "where you are" in C programming, or what problems you are having with this assignment. But if you want someone to do your assignment for you and want to compensate them, you should try a freelance/rent a coder type website, not an educational community.
    Last edited by Phenax; 04-05-2011 at 05:26 PM.
    Quote Originally Posted by Plato
    Never discourage anyone...who continually makes progress, no matter how slow.

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by rainhawk View Post
    you want 200-300 for a 150 line program :x? I understand there might have been a no homework policy and quite positive there are gonna be trolls that get offended here.

    I fell behind in class due to personal problems and haven't been able to catch up w/ the class. at this point i'm just trying to pass it. i don't plan on puruseing a career in programming so there's not a need to worry. I'm not asking anyone to do this for free or trying to bum this off someone. but if there's anyone with some spare time and can do it that's cool.

    No need to tell anyone they're a slacker because you have no idea how that person is in real life. Anyway........... yeah.
    No what you're doing is trying to cheat your way through school.

    Let me give you the humourless version...

    Do your own effing homework!
    Last edited by CommonTater; 04-05-2011 at 06:19 PM.

  7. #7
    Registered User
    Join Date
    Apr 2011
    Posts
    3
    Quote Originally Posted by Phenax View Post
    Well,

    I'm sure there are at least a few individuals here willing to help you understand and solve your problem. What are you going to do on your final exam? You can't pay someone to take that for you, unfortunately.
    First of all, Do you understand functions, loops (while, for, do), and other control statements (if, switch)? Do you understand arrays?

    I'll be happy to attempt to help you, if that's the case please try to explain "where you are" in C programming, or what problems you are having with this assignment. But if you want someone to do your assignment for you and want to compensate them, you should try a freelance/rent a coder type website, not an educational community.
    Since you're the only one who gave real advice and actually made me attempt this. I'll show you my progress. i understand all the concepts and Logic pretty much, i'm stuck more so with the syntax. Here's what i have so far.

    #include <stdio.h>
    #include <string.h>

    #define MAX 5

    void intro()
    {
    printf("Welcome to the Module\n");
    printf("Please select a Menu item\n");
    }

    void print_menu (void)
    {
    printf("\n1. Create data for your array.");
    printf("\n2. Print your data.");
    printf("\n3. Average your data.");
    printf("\n4. Clear data in arrays.");
    printf("\n5. Quit.");
    } //print menu

    char get_option (void)
    {
    char ans;

    do {
    scanf("%c", &ans);
    }while (ans!= '\n');

    scanf("%c", &ans);
    return toupper(ans);
    }

    int input_array()
    {





    I know what i'm supposed to be doing. making 3 one dimensional arrays that hold up to 5 positive #'s, i just don't know how to write the code for it.

  8. #8
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I've got some real advice: << !! Posting Code? Read this First !! >>

    Quzah.
    Hope is the first step on the road to disappointment.

  9. #9
    THANK YOU KINDLY SIR Phenax's Avatar
    Join Date
    Mar 2011
    Posts
    74
    This should help you with your problem.

    When you pass an array to a function, it decays to a pointer. A pointer is just something that points to a memory address. If you pass a pointer to a function, you are passing the memory address of that variable, so you can actually go to that memory address and modify it. So if you pass a pointer to a variable from our main function, and modify the data at that pointer in another function, the variable in our main function will be effected.

    You declare arrays like this:
    Code:
    type name[MAX_LENGTH];
    so
    Code:
    float data[MAX];
    perhaps in your case.

    Note this:
    Your array can contain five floats. That is, data[0] through data[4]. That does not include data[5].



    You still, of course, need to do the "error checking" and whatnot for the function.

    Code:
    #include <stdio.h>
    
    #define MAX 5
    
    void input_array(float data[]); //function prototype
    
    int main(void)
    {
    	float data1[MAX];
    	float data2[MAX];
    	float data3[MAX];
    
    	input_array(data1);
    
            //Now we can access user-inputted data from main.. Ex:
    	printf("From main - data1[0] = %f\n", data1[0]);
    
    	return 0;
    }
    
    void input_array(float data[])
    {
    	int i;
    
    	printf("Please input your data one at a time\n");
    
    	for(i = 0; i < MAX; i++)
    	{
    		printf("Data piece %d: ", i);
    		scanf("%f", &data[i]);
    		printf("\n");
    	}
    }
    Last edited by Phenax; 04-07-2011 at 03:00 PM.
    Quote Originally Posted by Plato
    Never discourage anyone...who continually makes progress, no matter how slow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to Speed Up My Program
    By purestr999 in forum C++ Programming
    Replies: 8
    Last Post: 03-23-2011, 07:23 AM
  2. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  3. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM