I'm making a program where I use a function to solve a quadratic, and if the value of a is not zero, it checks if it it has real roots and I have to remember those numbers.
The form is ax^2 + bx +...
Type: Posts; User: CProgWiz
I'm making a program where I use a function to solve a quadratic, and if the value of a is not zero, it checks if it it has real roots and I have to remember those numbers.
The form is ax^2 + bx +...
I'm confused as to what I should declare "a" to be, because when I said in the first part of my function:
if(ret == EOF)
return -999;
then at the main part of my function I...
My program is supposed to take in an interger, and tell me if it's a prime number or not. If I enter something like "woof", it'll tell me that it is invalid and does not work.
My program is as...
Damnnn, it isn't letting me delete this. ):
I'm pretty new at programming, so I'm not sure if it's called an array exactly, but I want to print my output so it does the following:
The ball strikes at:
x m
b m
y m
So far I have written...
Actually yeah I did do that now hahahahahahhahahahahaha
for (n = 1; n <= 50; n += 1)
printf("%8d %8d %8d\n", n, n * n, n * n * n);
What is the value of n for the above for loop?[/QUOTE]
For that I meant to type, what value is n once the above...
For the first one, I think it would be
sum+ = ++n
because in the first part, n++ is before the sum+=n.
For the second one, I think the final value of n will be 50, because it says n<= 50,...
The example from the previous slide was:
sum = n = 0;
while (sum <= 1000)
{
n++;
sum += n;
}
printf("The first sum > 1000 is %d, and n is %d\n", sum, n);