I've learned some looping and increments etc. but I feel clueless to put it together.
(using a while statement) Write a program that will generate a table with the values of Y given by the following formula:
Y(x) = [(x^2)/2]-x*ln(x)
x can only be greater than 0 for ln(x).
The user will enter the starting value of x and the increment between values of x. Your program will also allow the user to decide the number of lines to be displayed in a table.
Here's what I have so far:
counter = 1;
printf("\tThis program will generate a table with the values of Y\n"
"\n\tgiven: Y = (x^2)/2-x*ln(x)\n\n");
printf ("\t\tPlease enter the starting value of x: \n\n");
printf ("\t\tBy how much do you want the values of x to increment by: \n\n");
printf ("\t\tHow many lines do you want to display: \n\n");