Hello, we're doing a lab where this is our task:
We have an Arduino Esplora Board and we are going to drop it so far. The goal of the lab is to have a print statement output : "Ouch! I fell %lf...
Type: Posts; User: csmith03
Hello, we're doing a lab where this is our task:
We have an Arduino Esplora Board and we are going to drop it so far. The goal of the lab is to have a print statement output : "Ouch! I fell %lf...
For anyone still willing to help, I've been working on it a little more and researched some of the string functions, not sure if I did it correctly, but I wrote pseudocode.
For the parts where I...
Hello, I know the title doesn't make much sense, so I will post the instructions that I was given below.
I've wrote a VERY general code so far, I'm just not sure how to use a function to pass the...
I'm afraid I don't follow. There are terms "a*x^e". I think the function is supposed to calculate each term and then I'm supposed to call it as many times as the user inputted exponents (plus 1 for...
You have the function part correct, but inside the function, you need to have the user scan in the highest exponent degree so you know how many terms in f(x).
Ex: User inputs highest exponent: (3)...
It's all inside the function polynomial()
I need to do all of the math and return the value of (a, x and the exponent) in F(X).
The value returned should be an integer. I don't need to show...
Now they taught us we can return a value from the function, to do so, how do i get sum back to the main function? I was thinking to add
return sum; to the end of the function code, then,
in...
Okay, I took your advice and decided just to give it a try. You're right, I don't have much experience with arrays, haha.
int dotproduct();
Thanks for the feedback, yeah he kind of just sprung this on us Friday and it's due Tuesday.
How do you get user input for elements of an array?
example as in homework, I have two matrices, how...
Any ideas? Updated code:
#include <stdio.h>
int polynomial();
int expon, valx, coeff, a;
We also haven't really went over arrays, other than they're able to store multiple different variables of the same type. I'm not sure how to define an array like that or associate each individual...
Hi, we're learning Functions right now, and in lecture, he goes over the basics of it. How to set the function up, etc, etc.. Then he assigns complicated homework based on the easy-oriented lectures...
Yeah, so I figured out that you need to ask the user for inputs for the highest exponent, coefficients, and the value of X. You then need to calculate the function for user inputted X...
We're learning about C Functions right now, however I'm not exactly sure what my homework is asking for....
Here's the problem:
15246
Interesting... Can I just put 101 instead of 100+1 then?
Also, is there a way to add an if statement at the end and remove duplicating numbers in the print statement?
Thank you! I believe I understand how it works now! The temporary variable holds the higher value. The lower value is then stored into array[j] and after it's moved down in the element, the higher...
I get lost with all the loops, I understand it minimally, but I found this bubble sort algorithm online and experimented with numbers and ultimately got it to sort 100 random integers on the interval...
Hello,
I could not find my previous thread for this question and the code was updated a bit. Let me be as specific as possible with instructions:
My task is to generate 100 random numbers,...
@User
My professor told me to specifically use an if, if else and else inside of a while. Thanks for bringing up the flag, I added an if statement into the loop to break the condition.
I still...
Would I be able to get rid of the flag statement and put
(while center != (root)) , that way it stops iterating when it finds the root? The iterCount is more for the print statement
...
Firstly, would like to thank those of you taking time out of your day to help me with my codes, I'm new to C and not very good at it, but I am slowly learning.
My task here is to find the roots of...
Instructions: 2. Randomly generate 100 integers in the range [0, 1] using rand() function (remember toseed the rand generator) and save the numbers in an integer array. Write C code to computethe...
Well, as of right now, as you said, displaying the elements is no problem. To answer your question, I'm at a dead end. I have no coding backround to take the code I have at this moment posted above...
Userxbw, thank you. I figured out how to get the print statement to print how many ones there are, but I used too many int variables. I'm only allowed to use TWO int variables and ONE int array.
...
I'm going to be honest, a majority of our CPRE hasn't a clue how to do these problems, the TA's have been getting emailed all week. Here's the instructions: 15228
@Fiskker I'm not sure, haha,...