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
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
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
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.
no problems that what i write but they needed on looping but i do it on if stetment
maybe i miss some rules TTCode:#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) ; }
i promos that i write this code
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)?
Oh? Seems kind of similar to this.i promos that i write this code
thanks a lot i'll try ^^
... I haven't even offered a suggestion yet, just asked for a clarification of your requirements.
Oh well, as long as you're happy.
it's works thanks
so instead of learning it, you just copy someone elses....and wonder why you dont understand anything....
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.