Like Tree3Likes
  • 1 Post By Crossfire
  • 1 Post By Tomwa
  • 1 Post By Matticus

can you hope me (i am a new programming)

This is a discussion on can you hope me (i am a new programming) within the C Programming forums, part of the General Programming Boards category; hi guys i'm new programming only what i know is the basics and if else i have a project must ...

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    5

    can you hope me (i am a new programming)

    hi guys i'm new programming only what i know is the basics and if else i have a project must finish on next week i tried to hard but i dont have any idea thanks a lot if you guys help me

    the file in attachments
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    Dec 2012
    Posts
    289
    we dont want your assignments, we want to see your code to help you.
    we are not here to do it for you, but to help where your having a problem.
    do the code, post it, then ask for help

    http://cboard.cprogramming.com/c-pro...-homework.html
    http://cboard.cprogramming.com/c-pro...e-posting.html
    http://cboard.cprogramming.com/c-pro...ead-first.html
    Salem likes this.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    2,265
    I'm not keen on downloading random files. Since there is a pdf attached, I'm assuming you provided the assignment but not any source code. We won't do your work for you.

    Homework Policy

    For better assistance, follow these tips:

    1. Describe the assignment
    2. Provide the code you have written so far (using code tags)
    3. Describe the specific problem(s) you're having with the code.

  4. #4
    Registered User
    Join Date
    Jan 2013
    Posts
    5
    no problems that what i write but they needed on looping but i do it on if stetment

    Code:
    #include <stdio.h>
    
    
    
    
    double Line_m (double x1, double y1, double x2, double y2) ;
    double Line_b (double x1, double y1, double m) ;
    
    
    
    
    main()
    {
    
    double x1, y1, x2, y2, m, b ;
    
    
    
    
    printf ("Enter Coordinates x1 and y1: ") ; 
    scanf ("%lf%lf", &x1, &y1) ; 
    printf ("Enter Coordinates x2 and y2: ") ; 
    scanf ("%lf%lf", &x2, &y2) ;
    
    
    
    if (x2 - x1 != 0.0)
    {
    
    m = Line_m (x1, y1, x2, y2) ;
    b = Line_b (x1, y1, m) ;
    
    
    
    printf ("Equation: y = %.2f * x + %.2f \n", m , b ) ;
    }
    else
    {
    
    printf ("Equation: x = %.2f \n\n", x1 ) ;
    }
    
    return (0);
    }
    
    
    
    
    
    
    double Line_m (double x1, double y1, double x2, double y2)
    {
    return ((y2 - y1)/(x2 - x1)) ;
    }
    
    
    
    
    double Line_b (double x1, double y1, double m)
    {
    return (y1 - m * x1) ;
    }
    maybe i miss some rules TT

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    5
    i promos that i write this code

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    2,265
    What exactly do you want to put into a loop? The entire thing (user re-enters values each iteration)? Just the calculations (automatically change some variable values each iteration)?

    i promos that i write this code
    Oh? Seems kind of similar to this.

  7. #7
    Registered User
    Join Date
    Jan 2013
    Posts
    5
    thanks a lot i'll try ^^

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    2,265
    ... I haven't even offered a suggestion yet, just asked for a clarification of your requirements.

    Oh well, as long as you're happy.

  9. #9
    Registered User
    Join Date
    Jan 2013
    Posts
    5
    it's works thanks

  10. #10
    Registered User
    Join Date
    Oct 2012
    Posts
    22
    Quote Originally Posted by Matticus View Post
    Oh? Seems kind of similar to this.
    I'm pretty sure you just googled the answer for him

  11. #11
    Registered User
    Join Date
    Dec 2012
    Posts
    289
    so instead of learning it, you just copy someone elses....and wonder why you dont understand anything....

  12. #12
    Registered User
    Join Date
    Oct 2012
    Posts
    22
    The funny thing is I think Matticus meant to call him out on him writing the code but ended up linking him to the working code instead
    Crossfire likes this.

  13. #13
    Registered User
    Join Date
    Jun 2011
    Posts
    2,265
    Quote Originally Posted by Tomwa View Post
    The funny thing is I think Matticus meant to call him out on him writing the code but ended up linking him to the working code instead
    I didn't think so - the OPs code looked like a mangled version of the code I linked (with some variable names changed). Admittedly, I was at work and didn't do a complete comparison.

    Meh, if you're right, and they copy/pasted the solution, they're doomed to fail eventually anyway.
    Crossfire likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hi hope you can help me
    By lars in forum C# Programming
    Replies: 5
    Last Post: 08-09-2011, 07:45 AM
  2. Is there any hope for me???
    By wesleyborthwick in forum Game Programming
    Replies: 23
    Last Post: 01-21-2010, 03:46 PM
  3. hi im new..hope u can help me..
    By dude123 in forum C Programming
    Replies: 2
    Last Post: 01-14-2009, 06:33 AM
  4. [We hope that you choke]
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 05-20-2002, 06:00 AM
  5. very simple, I hope?
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 01-17-2002, 02:51 PM

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