# can you hope me (i am a new programming)

• 01-08-2013
ss-alsin
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
• 01-08-2013
Crossfire
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
• 01-08-2013
Matticus
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.
• 01-08-2013
ss-alsin
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
• 01-08-2013
ss-alsin
i promos that i write this code
• 01-08-2013
Matticus
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)?

Quote:

i promos that i write this code
Oh? Seems kind of similar to this.
• 01-08-2013
ss-alsin
thanks a lot i'll try ^^
• 01-08-2013
Matticus
... I haven't even offered a suggestion yet, just asked for a clarification of your requirements.

Oh well, as long as you're happy.
• 01-08-2013
ss-alsin
it's works thanks :redface:
• 01-08-2013
Tomwa
Quote:

Originally Posted by Matticus
Oh? Seems kind of similar to this.

• 01-08-2013
Crossfire
so instead of learning it, you just copy someone elses....and wonder why you dont understand anything....
• 01-08-2013
Tomwa
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
• 01-08-2013
Matticus
Quote:

Originally Posted by Tomwa
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.