Ok I think I am getting close to the objective. I have made this, but it doesn't quite work.
Just my function:
double cosine(double rad, double a)
{
double cosineofradians=1;
int n=2;
Type: Posts; User: zfite
Ok I think I am getting close to the objective. I have made this, but it doesn't quite work.
Just my function:
double cosine(double rad, double a)
{
double cosineofradians=1;
int n=2;
I am in calculus and I have an A with one month left in the semester so I think the problem is somewhere else. In the program I included I tested the absolute value up to five terms.
I think I have the testing the absolute value of the terms down. Maybe I am confused on what a term is and the series.
What happens when you test the absolute value and when do you do it?
I am having trouble with this problem. I have attached the assignment. My main problem is understanding what is being asked of me, I must have no idea. My professor told me I must use a loop...
Ok I just used a local variable and got did it. I remember he said we can not use global variables on our assignments but since we haven't learned static it must be the only way.
Thanks
My...
Is there a way to do this without using static?
Hmmm well that does work however I have not learned anything with prompt or %s...
Is there a way to do it using a counter of some sort?
For extra credit in my class, I have to modify this user defined function to say
Enter the 1st integer:
Enter the 2nd integer:
Enter the 3rd integer:
Enter the 4th integer:
Enter the 5th...
I figured it out during class today.
#include <stdio.h>
int main()
{
//variable declarations
int h, w;
can someone please help me make the box pattern?
The box may be easy but that is the one I need help with now, I have completed the first pattern.
What I have attached are the patterns that I need to make by using for loops. I have attached the code I have, the assignment, and my professor's example.
for (row=1;row<=h;row++)
{
for (col=1;col<=h;col++)
{
if(col<=row)
{
printf (" ");
}
else
The part of the assignment that I can not figure out is:
"use a nested loop for the patterns. In the inner loop you may use an if structure to determine what to print on each line."
The pattern...
Thanks quzah, I was in the middle of trying that when you posted. Got it down.
well it depends on the inputted numbers, for bigger numbers I was getting 25 rows, but with the test value I must use for my homework (c=15 and inc=2.5) I was only getting 20.
I need help figuring out how to make this for loop print 25 times no matter what. The problem is to: generate a table of conversions from Celsius to Rankin, allow the user to enter starting temp and...
Thanks, I got it.
So from what you just said, I should have three if statements, something like this?
if(num2>max)
{
max = num2;
}
if(max>num2)
{
counter2=1;
}
I am having trouble doing this problem. It is:
"write a program that asks the user to enter a list of integers. The program will then determine the largest value and the number of times it was...
Ok I figured it out. I just changed }while(sel2=Y); to }while(sel2=='Y');
Thanks guys, I'll be back again.
Thanks for the quick reply, however I have not learned the getchar() function in my class, therefore I can not use it. Is there another way?
I forgot to mention that this must be in C.
The assignment is: Add a do-while loop so that the program will continue prompting the user to see if another calculation is to be done.
I can't seem to figure out how to do the do-while loop....