- #1
ramses07
- 11
- 0
Homework Statement
I'm trying to create a c program that will allow for multiple inputs for a simple linear equation, and will print those values. the program I've created only returns one value
Homework Equations
y = mx + b
The Attempt at a Solution
Code:
#include <stdio.h>
#include <math.h>
int main ()
{
int numbers[2];
int x,y;
printf("Enter x data set:");
for(x=0;x<2;x++);
x = numbers[2];
scanf("%d",&numbers[2]);
y = 5 * numbers[2] + 4;
printf("the y values are; %d", y);
}
Last edited by a moderator: