All pastes #244420 Raw Edit

Unnamed

public text v1 · immutable
#244420 ·published 2006-11-09 19:41 UTC
rendered paste body
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int hochstezehnerpotenz (int i){

    int x=1;
    int j = abs (i);
    int zahler;

    if ( j >=0 ){
		while ( j>9 ){
			j = j / 10;
			x = x* 10;
		}
	}
 
 /*printf ("%d \n %d ", j, x);*/

	for ( x; x != 0 ; x/10){
		
		i = i/ x;
		
	    return i;
        
        //i = i % x;		
	}

	

//	return 0;	
}


int alsText (int i){

	int z;
	int y;

	z = hochstezehnerpotenz(i);
	

	
	return z;
}



void printziffer (int i){



	switch (i){
		case 0: printf("Null"); 
				break;
		case 1: printf("Eins");
				break;
		case 2: printf("Zwei");
				break;
		case 3: printf("Drei");
				break;
		case 4: printf("Vier");
				break;
		case 5: printf("Fünf");
				break;
		case 6: printf("Sechs");
				break;
		case 7: printf("Sieben");
				break;
		case 8: printf("Acht");
				break;
		case 9: printf("Neun");
				break;
		}




}



int main(){

	int y = alsText(142);
	printziffer(y);



	return 0;

}