# 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. ## 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

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

3. 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. 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. i promos that i write this code

6. 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. thanks a lot i'll try ^^

8. ... 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. it's works thanks

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