Ask Experts Questions for FREE Help !
Ask
    frozendog11's Avatar
    frozendog11 Posts: 1, Reputation: 1
    New Member
     
    #1

    Aug 8, 2011, 06:00 AM
    Need Help On Subtracting
    #include <stdio.h>
    #include <stdlib.h>

    int main(void)
    {
    float *Numbers = NULL,J[80], BiggestNum = 0,Total = 0, Q;
    int InputBuffer = 0;
    int I = 0 , Total1=0;
    do
    {
    printf( "Please Enter How Many Number You Want to subtract(1~80): " );
    scanf( "%d", &InputBuffer );
    InputBuffer = InputBuffer-1;
    } while( ( InputBuffer < 1 ) || ( InputBuffer > 80 ) );
    Numbers = ( ( float * )calloc( InputBuffer, sizeof( int ) ) );
    if( Numbers == NULL )
    {
    printf( "Failed to allocate the array. Exiting" );
    getchar( );
    return 1;
    }

    {
    printf("Enter Number[1]: ");
    scanf("%f",&J[80]);
    }
    {
    for( I = 0; I < InputBuffer; I++ )
    {

    printf( "Enter number[%d]: ", ( I + 2 ) );
    scanf( "%f", &BiggestNum );
    Numbers[I] = BiggestNum;
    }

    BiggestNum = 0;

    for( I = 0; I < InputBuffer ; I++ )
    if( BiggestNum < Numbers[I] )
    BiggestNum = Numbers[I];

    for( I = 0; I < InputBuffer; I++ )
    Total = J[80] -= Numbers[I];


    printf( "\nSubtract of the numbers entered is: %f\n", Total );
    return 0;
    }
    }

Check out some similar questions!

I'm having some difficulty with polynomials mostly subtracting them [ 1 Answers ]

I'm having problems with polynomials

Subtracting Mixed Numbers [ 2 Answers ]

Could anyone tell me the correct answer for 6 1/4 - 3 1/3

Subtracting mixed numbers [ 2 Answers ]

How do you subtract 5 2/9 from 1 2/3 and can you break it down step by step .Thank you

Subtracting fractions [ 1 Answers ]

Hi everyone, Sorry I haven't been here in a while but I need some help in math, it's been so long since I have been in school I have forgotten some things,, will you please explain to me how to do subtracting fractions, Thank you so much ...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.