All pastes #39655 Raw Edit

Something

public text v1 · immutable
#39655 ·published 2006-02-02 19:41 UTC
rendered paste body
#include <stdio.h>

main()
{
	int i, j, re, bo, k;
	char s;
	int tre, two, nope; //For errors functions!
		
	printf("--------------------------\n");
	printf("cALcY v0.04 ");
	printf("[+ - * i / %]\n");
	printf("--------------------------\n");
	printf("How many number you want use?\n");
	scanf("%d", &k);
	
	switch(k)
	{
		case 2: { two=re; break;}
		case 3: { tre=re; break;}
		default: { nope=re; break;}
	}
	
	if(two=re)
	{
	//For 2 numbers Calculations	
	printf("Please add 2 numbers with +, -, /, * or % \n");
	printf("Ex. 2+2, 5*9. Then push ENTER!\n");
	

		scanf("%d%c%d", &i, &s, &j);
		switch(s)
		{
			case '+': { re=i+j; break;}
			case '-': { re=i-j; break;}
			case '*': { re=i*j; break;}
			case '/': { re=i/j; break;}
			case '%': { re=i%j; break;}
			default : { re=bo; break;}
		}		  
	
		if(re=bo)
		{
		printf("cALcY doesn't support these functions, please try again.\n");
		}
		
		printf("%d\n", re);

	}
	else if(tre=re)
	{
		printf("This function is not ready yet!\n");
	}
	else if(nope=re)
	{
		printf("Something WRONG!\n");
	}
}