Search:

Type: Posts; User: AFCKING

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Need suggestion with Hexadecimal to Binary converter.

    #include<stdio.h>#define MAX 1000


    int main(){
    char binaryNumber[MAX],hexaDecimal[MAX];
    long int i=0;


    printf("Enter any hexadecimal number: ");
    scanf("%s",hexaDecimal);
  2. Replies
    4
    Views
    3,846

    Right! since it returns a negative value for...

    Right! since it returns a negative value for difference I need to use the absolute value. Thanks. Haha it took me long enough to understand.
  3. Replies
    4
    Views
    3,846

    Yes I have that #include "stdlib.h" I didn't...

    Yes I have that #include "stdlib.h" I didn't copied it
  4. Replies
    4
    Views
    3,846

    Help with square root using pseudocode

    #include "stdio.h"float squareRoot(float number, float accuracy);
    int main()
    {

    float a;
    printf("\nsquare root test 1: enter a number\n");
    scanf("%f",&a);
    ...
  5. Replies
    5
    Views
    828

    Yeah I got guys, thank you. I use the int* b =...

    Yeah I got guys, thank you. I use the int* b = malloc(....) and it works, maybe should learn dynamic array again.
  6. Replies
    5
    Views
    828

    Hi, thanks for your input the missing bracket is...

    Hi, thanks for your input the missing bracket is the copying i miss it. When I take b[0] and b[1] out it still does not show, apparently it shows some weird number
  7. Replies
    5
    Views
    828

    Can someone point out where I went wrong?

    // Fiboncacci Test---------------------------------
    int n;
    int* fib;


    printf("\nFibonacci test 1: enter an integer\n");
    scanf("%d",&n);

    ...
  8. Replies
    7
    Views
    1,261

    I asked what should I do as in give me some...

    I asked what should I do as in give me some pointers so I could do them myself, right now I don't know where to start, what is the point of having forums to ask if you already have google. Google...
  9. Replies
    7
    Views
    1,261

    Fibonnaci Sequence

    int main()
    {
    int n;
    int* fib;
    printf("\nFibonacci test 1: enter an integer\n");
    scanf("%d",&n);
    fib = fibonacci(n);
    printf("fib(%d) = ", n);
    for(int i = 0; i < n; ++i){
    ...
  10. Thread: Help!

    by AFCKING
    Replies
    2
    Views
    676

    Help!

    How do you add two matrices together ?
  11. Replies
    8
    Views
    1,068

    Yes it will loop until the array is over, but...

    Yes it will loop until the array is over, but somehow it keeps returning 1 even though it is wrong.
  12. Replies
    8
    Views
    1,068

    Can any tell me what is wrong with this?

    int sorted( int a[], int b)
    {

    for(int c = 0; c < b - 1; ++c)
    {
    if(a[c]<a[c+1])
    return 1;
    else
    return 0;
    }
  13. Replies
    6
    Views
    1,306

    I think I got it, thanks!

    I think I got it, thanks!
  14. Replies
    6
    Views
    1,306

    something like this float sumSquares(float...

    something like this

    float sumSquares(float a[], float b)
    {
    int c;
    float total = 0;
    for(c = 0; c < b; ++c)
    {
    total = a[c]*a[c] + total;
    }
  15. Replies
    6
    Views
    1,306

    I don't know what to do, a tip to where to start...

    I don't know what to do, a tip to where to start or what to use would be nice. I am suppose to use the stdio and stdlib only.
  16. Replies
    6
    Views
    1,306

    Assignments help

    Hey guys, I am suppose to do this but I am stuck, any help would be appreciated.

    1 - Sum of Squares
    Write a function called sumSquares that returns the sum of the squares of its float array...
  17. Replies
    5
    Views
    1,312

    Arguments and parameters help.

    Is there anyway we can return 2 values from a called function
    example


    float xxxx(float a, float b, float c, float d)
    {///
    ///
    ///
    }
  18. Replies
    12
    Views
    1,250

    void a2question2(float *n1, float *n2, float...

    void a2question2(float *n1, float *n2, float *n3){
    int i;

    for(i=1; i <= 3; ++i)
    {
    printf("Enter %d%s", i, i == 1 ? "st", i == 2 ? "nd" : "rd");
    scanf("%f", i == 1 ? n1...
  19. Replies
    12
    Views
    1,250

    float three_numbers(float num1, float num2, float...

    float three_numbers(float num1, float num2, float num3){
    printf("Sum = %.0f\n", num1+num2+num3);
    printf("Average = %.2f\n", (num1+num2+num3)/3);
    printf("Product = %.0f\n",num1*num2*num3);
    }...
  20. Replies
    12
    Views
    1,250

    I found this code #include...

    I found this code
    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int n,big,sml,i,totalNumber;
    clrscr();
    printf("\n How many number you will enter : ");
    scanf("%d",&totalNumber);
    for...
  21. Replies
    12
    Views
    1,250

    I was reading another thread;...

    I was reading another thread; http://cboard.cprogramming.com/c-programming/124905-determine-largest-smallest-three-integers.html, and there is a guy suggested using swap() so I look it up on the...
  22. Replies
    12
    Views
    1,250

    I already have a working code, but it does not...

    I already have a working code, but it does not look aesthetic due to using too many if() and else if(), I am learning it by myself and right now I am reading on swap() which I think it can be used to...
  23. Replies
    9
    Views
    1,104

    Thanks!

    Thanks!
  24. Replies
    12
    Views
    1,250

    Need help on C programming

    Hi guys, is there anyway to have a program where it ask for three numbers and you shows which which number is the largest and which is the smallest, e.g.

    Enter 1st number: 30
    Enter 2nd number: 10...
  25. Replies
    9
    Views
    1,104

    Thanks, that was insightful. Somehow I still...

    Thanks, that was insightful. Somehow I still can't use it in my function, it will still give me the value for only 1 equation.
Results 1 to 25 of 28
Page 1 of 2 1 2