Search:

Type: Posts; User: ashlee

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. hi guys, was wondering how you would set this program up:

    i won't beat around the bush and will say that this is an assignment and i'm not that experienced in writing programs. all semester my teacher has had us "trace" programs as of which he would give...
  2. Replies
    3
    Views
    1,685

    Hm whydo i keep getting 19

    Hm whydo i keep getting 19
  3. Replies
    3
    Views
    1,685

    don't understand an array in function program

    #include<stdio.h>
    void round (int values[5][5]);
    int keep (int num[5][5]);

    void main(void){
    int first[5][5];
    int p, q;

    for (p = 0; p < 5; ++p)
    for (q = 0; q < 5; ++q)
  4. Replies
    3
    Views
    873

    oh okay so d is just adding up what J was each...

    oh okay so d is just adding up what J was each time it satisfied that for loop and went into the next function. got ya.

    yeah the programs really have no point except to help learn functions i...
  5. Replies
    3
    Views
    873

    new to functions

    #include<stdio.h>
    float here (float num);
    float there (float x);

    void main(){
    printf("see that = %.2f\n", here(3.5));
    }

    float here (float num){
    int i, c = 0;
  6. Replies
    8
    Views
    8,491

    any ideas? just cant get this to print. i want...

    any ideas? just cant get this to print. i want it to show.
    First Student - GPA 4.0
    Second Student - GPA 3.7
    Third Student - GPA 2.0
    -
    -
    Twentieth Student - GPA 1.0
  7. Replies
    1
    Views
    939

    2d array question

    main(void)
    {
    int i, j, k, m, n, p[2][3], q[2][3], r[2][3];
    for(i = 0; i < 2; ++i)
    for(j = 0; j < 3; ++j)
    {
    m = i + 3;
    n = j + 2;
    k = m%n;
  8. Replies
    8
    Views
    8,491

    yeah, when the } is taken out after the for loop...

    yeah, when the } is taken out after the for loop i just get:

    0, 2.3
    1, 1.0
    2, 1.0 and 1.0 for the rest of them up to 20.
  9. Replies
    8
    Views
    8,491

    any idea why this shows no output? ...

    any idea why this shows no output?

    #include<stdio.h>
    int main()
    {
    float exam_a[20] = { 77, 65, 89, 79, 85, 90, 98, 45, 83, 75, 71, 85, 85, 80, 68, 72, 56, 82, 63, 80} ;
    float exam_b[20] = {...
  10. Replies
    8
    Views
    8,491

    is any calculation really necessary then? can...

    is any calculation really necessary then? can something like



    if (student[k] >= 90){

    printf("%i, 4.0 \n", k);
    }
    if (student[k] >= 80){
  11. Replies
    8
    Views
    8,491

    calculating gpa with only grades?

    is there some sort of calculation for just GPA without knowing the credits? i wrote a program which shows the average 20students have each after taking 3 exams each. now i must print the GPA of...
  12. Thread: loop question.

    by ashlee
    Replies
    3
    Views
    1,845

    that means it'll go through one last time?

    that means it'll go through one last time?
  13. Thread: loop question.

    by ashlee
    Replies
    3
    Views
    1,845

    loop question.

    i attached a program with the output that i had on a midterm the other day here -
    http://img233.imageshack.us/img233/1452/20101029191753941.jpg

    the output being on the right.. i was wondering why...
  14. Replies
    1
    Views
    828

    quick printf question

    http://i51.tinypic.com/ejabg0.jpg

    i'm doing this program and understand it except for the printf at the end. why is there a %4i$14i there?
  15. Replies
    4
    Views
    1,164

    sorry about that guys. you are indeed right. it...

    sorry about that guys. you are indeed right. it was that ++p.
    thanks
  16. Replies
    4
    Views
    1,164

    easy loop question

    #include <stdio.h>
    main()
    {
    int j, k, p = 3;

    for (j = 35; j > 0; j = j - 3)
    {
    if (j%5 == 2)
    {
    k = j*(j-1)/5;
  17. Replies
    11
    Views
    1,194

    i knew that! thanks. we're getting there

    i knew that!

    thanks. we're getting there
  18. Replies
    11
    Views
    1,194

    sooo we're getting the sum here? sum +=...

    sooo we're getting the sum here?
    sum += (float)x[i]

    and what exactly is %.1f?
  19. Replies
    11
    Views
    1,194

    okay so it's starting to make sense here. the...

    okay so it's starting to make sense here. the index is being added by one like a normal array is.. so if the numbers were 4,8,10,11,13 it would add the totals of each even number and then each...
  20. Replies
    11
    Views
    1,194

    x[i] = 0; thats what is confusing me.. why...

    x[i] = 0; thats what is confusing me.. why exactly is that there? x[i] = 0; i is 0 there for setting x[0] to 0?
  21. Replies
    11
    Views
    1,194

    a program on arrays. need some help.

    the output being:



    i'm just trying hard to make sense of this program here.
    so this


    is going to loop each array and check if the remainder is 1. if so then the array = 0?
    and then...
  22. Replies
    14
    Views
    1,616

    thank you for your help

    thank you for your help
  23. Replies
    14
    Views
    1,616

    i guess my question is is how do i put this into...

    i guess my question is is how do i put this into c?
    do i split up this long formula into parts such as first do the beginning... then take that and put it to the power of -12.. then take that and...
  24. Replies
    14
    Views
    1,616

    so is it just pow(-12) ?

    so is it just pow(-12) ?
  25. Replies
    14
    Views
    1,616

    oh okay. guess this tutorial is no good then.

    oh okay. guess this tutorial is no good then.
Results 1 to 25 of 28
Page 1 of 2 1 2