All pastes #954055 Raw Edit

Mine

public text v1 · immutable
#954055 ·published 2008-03-23 16:43 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(void)
{
	int h,m,s;
	
	h=0;
	m=0;
	s=0;
	
	printf("Cronômetro feito em C\n\n");
	//system("clear");
	//printf ("%d : %d : %d",h,m,s);
	
	while(1)
	{
		sleep(1);
		s++;
		if (s>59)
		{
			s=0;
			m++;
		}
		if (m>59)
		{
			m=0;
			h++;
		}
		if (h>23)
		{
			h=0;
		}
	//system("clear");
	printf ("\r%d : %d : %d",h,m,s);
	printf("\n");
	}
	return 0;
}