Search:

Type: Posts; User: naspek

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,116

    yup2.. still got the same answer.. is there...

    yup2.. still got the same answer.. is there anything wrong?
  2. Replies
    8
    Views
    1,116

    compiled it already.. and the result is.. Little...

    compiled it already..
    and the result is.. Little endian

    to be sure that the program working well,
    i substitute Little with Big and vice versa..



    #include <stdio.h>
    int main()
  3. Replies
    8
    Views
    1,116

    Endianness of machine

    hey there..

    my lecturer gave me the source code and ask me to give comment for each line..


    #include <stdio.h> //standard I/O header file to declare printf, scanf n other things
    int main()...
  4. Replies
    3
    Views
    1,490

    got it guys!! thanks for guiding me!! =) here...

    got it guys!!
    thanks for guiding me!! =)
    here is my new and correct code...


    #include <stdio.h>
    int main () {

    int x, y, i;
  5. Replies
    3
    Views
    1,490

    Program Control (for loop)

    hey there.. i'm having a hard time to get output like below...

    0
    .1
    ..2
    ...3
    ....4
    .....5
    ......6
    .......7
  6. Replies
    2
    Views
    17,707

    mean, mode median calculation..

    hey there..
    this is my code...


    #define SIZE 100
    #include<stdio.h>
    float mean_function(float[],int);
    float median_function(float[],int);
    float mode_function(float[],int);
    int main()
  7. ok.. in main function, i just need to print the...

    ok.. in main function, i just need to print the output of
    Status: ELIGIBLE or..
    Status: NOT ELIGIBLE

    my idea is to declare all my works for status in function definition..
    and in the main...
  8. what i'm trying to do is, i want to store E =...

    what i'm trying to do is, i want to store E = ELIGIBLE and N = NOT ELIGIBLE.
    then.. i want to call them by referrence in main function..


    char *statusPtr;

    loan_calculate(L, DP, Y, S,...
  9. ok.. this is the code that i've makes some...

    ok.. this is the code that i've makes some corrections..


    #include <stdio.h>
    void loan_calculate (float L, float DP, int Y, float S, float *monthlyPtr, char *statusPtr, float I);
    int main ()
    {...
  10. loan_calculate (L, DP Y, S, &monthlyPtr, &status);

    loan_calculate (L, DP Y, S, &monthlyPtr, &status);
  11. ok.. i've made corrections d... void...

    ok.. i've made corrections d...



    void loan_calculate (float L, float DP, int Y, float S, float *monthlyPtr, char *statusPtr){

    *monthlyPtr = ((L-DP) + ((L-DP) * (I/100) * Y)) / (12 * Y);

    ...
  12. ok.. so simple one first.. how am i going to...

    ok.. so simple one first..
    how am i going to correct this "status == ELIGIBLE "?
    is it... status == [ELIGIBLE]?
  13. Loan Calculator (problem with function & pointer)

    hey there...
    need ur guys help to highlight my mistakes..
    i'm suppose to get the output below...

    LOAN ADVISOR
    Car purchase price/loan <RM>: 15000
    Down payment <RM>:0
    Payment period <in...
  14. Thread: srand(unsigned)

    by naspek
    Replies
    6
    Views
    10,862

    ok.. thanks tabstop! =)

    ok.. thanks tabstop! =)
  15. Thread: srand(unsigned)

    by naspek
    Replies
    6
    Views
    10,862

    what do u mean by "seed"? y must include...

    what do u mean by "seed"?
    y must include "unsigned" inside srand()?
  16. Thread: srand(unsigned)

    by naspek
    Replies
    6
    Views
    10,862

    srand(unsigned)

    what is the use of srand(unsigned) in a program to generate random numbers?
    what is the differences between srand(unsigned) and srand()?
  17. Replies
    7
    Views
    1,762

    got it!! thanks spidey!!

    got it!! thanks spidey!!
  18. Replies
    7
    Views
    1,762

    i'd try to insert while repetition structure......

    i'd try to insert while repetition structure...
    but, it cant be stop.. and "PRESS ANY KEY TO CONTINUE" isnt functioning..

    #include<stdio.h>
    #include <stdlib.h>
    #include <time.h>

    int...
  19. Replies
    7
    Views
    1,762

    Generating random numbers...

    hey there...
    i need to create a random numbers generator..
    i solve the code already..
    but.. how am i going to have my program keep on running..
    for example:
    "PRESS ANY KEY TO CONTINUE"
    (then.....
  20. Replies
    21
    Views
    6,286

    i've try for so many times... but still cant get...

    i've try for so many times... but still cant get it..
  21. Replies
    21
    Views
    6,286

    guys.. i got stuck again.. hurmm..~ ...

    guys.. i got stuck again..
    hurmm..~



    printf("Enter a number between 1 to 20 (1-20): ");
    scanf("%d", &x);

    for ( i = x; i <= x + 3; i++ ) {
    printf("\t%d", i);
  22. Replies
    21
    Views
    6,286

    ok.. i'll try it first... until i dont know wut...

    ok.. i'll try it first... until i dont know wut should i do..
    thanks guys.. =)
  23. Replies
    21
    Views
    6,286

    ok.! understand now.. thank u very much!!! ...

    ok.! understand now..
    thank u very much!!!


    for ( i = x; i <= x + 3; i++ ) {
    printf("\t%d", i);
    for ( j = 2; j <= 5; j++ ){
    printf("\t%d", i*j);
    }
    ...
  24. Replies
    21
    Views
    6,286

    ok.. i try print it.. but.. the vertical line...

    ok.. i try print it.. but.. the vertical line does not change..
    my loop is now correct aite?
    just the printf part is wrong aite?


    for ( i = x; i <= x + 3; i++ ) {
    printf("\t%d", x);
    ...
  25. Replies
    21
    Views
    6,286

    for ur question: i thought i can get my...

    for ur question: i thought i can get my multiplication table.. but, i'm wrong..
    ok.. i'd change my for loop..
    but the output kinda weird..



    for ( i = x; i <= x + 3; i++ ) {
    for ( j =...
Results 1 to 25 of 38
Page 1 of 2 1 2