Search:

Type: Posts; User: csmith03

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Free Fall

    by csmith03
    Replies
    1
    Views
    2,777

    Free Fall

    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...
  2. For anyone still willing to help, I've been...

    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...
  3. Replacing string with another string with user-inputted position

    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...
  4. Replies
    11
    Views
    8,245

    I'm afraid I don't follow. There are terms...

    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...
  5. Thread: help me

    by csmith03
    Replies
    3
    Views
    2,591

    You have the function part correct, but inside...

    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)...
  6. Replies
    11
    Views
    8,245

    It's all inside the function polynomial() I...

    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...
  7. Replies
    10
    Views
    3,310

    Now they taught us we can return a value from the...

    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...
  8. Replies
    10
    Views
    3,310

    Okay, I took your advice and decided just to give...

    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();
  9. Replies
    10
    Views
    3,310

    Thanks for the feedback, yeah he kind of just...

    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...
  10. Replies
    11
    Views
    8,245

    Any ideas? Updated code: #include...

    Any ideas? Updated code:




    #include <stdio.h>


    int polynomial();
    int expon, valx, coeff, a;
  11. Replies
    10
    Views
    3,310

    We also haven't really went over arrays, other...

    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...
  12. Replies
    10
    Views
    3,310

    Question for HWK.

    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...
  13. Replies
    11
    Views
    8,245

    Yeah, so I figured out that you need to ask the...

    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...
  14. Replies
    11
    Views
    8,245

    Trying to understand this homework

    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
  15. Interesting... Can I just put 101 instead of...

    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?
  16. Thank you! I believe I understand how it works...

    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...
  17. Can someone explain how this bubble sorting works?

    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...
  18. One last problem! Displaying random numbers in INCREASING order!

    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,...
  19. Replies
    6
    Views
    3,398

    @User My professor told me to specifically use...

    @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...
  20. Replies
    6
    Views
    3,398

    Would I be able to get rid of the flag statement...

    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
    ...
  21. Replies
    6
    Views
    3,398

    While Loop not iterating

    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...
  22. Replies
    16
    Views
    3,455

    Can this be reduced to two INT variables?

    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...
  23. Replies
    9
    Views
    16,258

    Well, as of right now, as you said, displaying...

    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...
  24. Replies
    24
    Views
    10,957

    Userxbw, thank you. I figured out how to get the...

    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.
    ...
  25. Replies
    9
    Views
    16,258

    I'm going to be honest, a majority of our CPRE...

    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,...
Results 1 to 25 of 39
Page 1 of 2 1 2