Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

A little help would be nice...

Name: Anonymous 2010-05-01 5:17

Hello /prog/rammers.

Can someone help me with a C dilemma I currently have?

We have to make a program that calculates how many ones, fives and tens you need given a whole number amount.

Hints, anyone?

Name: Anonymous 2010-05-01 11:51



#include <stdio.h>

int crunch(input){
        int tens, fives, ones;
        printf("INPUT WAS: %i\n", &input);
        tens = input % 10;
        fives = fives % 5;
        ones = fives % 1;
        printf("tens:     %i        | fives:    %i       |    ones:  %i  \n", &tens, &fives, &ones);
        return(20);
}


int main(){
        int number_to_be_analyzed;
        printf("Give to me an integer: ");
        scanf("%i", &number_to_be_analyzed);
        crunch(number_to_be_analyzed);
        return(1);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List