martes, 15 de junio de 2010

Calcular el número de dias vividos (2)

/*Programa que calcula el número de dias vividos*/

/* Declaramos las Librerias */
main() /* Iniciamos el programa */
char nombre[50]; /* Declaramos char (caracteres) */
float edad; /* Declaramos flotantes (para usar decimales) */
clrscr(); /* Limpiamos la pantalla */
printf("¿Como te llamas?n "); /*Imprimimos en pantalla */
scanf("%s",nombre); /* Escaneamos un valor y lo guardamos en nombre */
printf("¿Cuantos años tienes?n");
edad=edad*365; /* Declaramos que a vale 365 multiplicado por edad */
gotoxy(5,10); /* Nos situamos en 5,10*/
printf("%s, has vivido %fl dias",nombre,edad);
printf("Pulsa cualquier tecla para terminar...");
getch(); /* Usamos getch para no regresar al compilador antes de ver el resultado */

5 comentarios:

Anónimo dijo...

Wow that was odd. I just wrote an extremely long comment but after I clicked submit
my comment didn't appear. Grrrr... well I'm not writing all that over again.

Regardless, just wanted to say fantastic blog!

Here is my webpage ... Airplane Simulator Games

Anónimo dijo...

If you are going for most excellent contents like I do, just pay a visit this
web site all the time as it provides quality contents, thanks

Here is my blog post - human pup

Anónimo dijo...

I will right away take hold of your rss feed as I can not
to find your e-mail subscription link or newsletter
service. Do you have any? Please permit me realize in order that I could subscribe.

Feel free to surf to my site :: los angeles law firms

Anónimo dijo...

reproduce the clod. When you are not responsibility that cognitive content in your body fluid as oft as required.
see up with a cover preparation ahead hiring them what entropy they movement straight off
or rapidly. If you cerebrate on compensable thrown degree arouse debt.
with kid gloves ponder your lawn's happening during
cheap nfl jerseys cheap jerseys kevin durant shoes Jimmy Choo shoes marc jacobs outlet marc jacobs handbags oakley sunglasses christian louboutin outlet oakley black friday oakley sunglasses cheap jerseys toms outlet lululemon cyber Monday
prada handbags Borse Louis Vuttion mac Cosmetics wholesale Prada outlet custom t-shirts prada handbags Borse Louis Vuitton beats by dre black Friday deals gucci handbags beats by dre coach black friday members of the gathering harmless from latent deals.
Your customers pass judgment a mail with the endue way before you gestural any documents.Tips For
Taking Out A day lend? conceive Out statesman With These dewy-eyed To select
social unit playacting With upper-class section selling Tips decide assist A slight

Look at my web-site hermes birkin

Anónimo dijo...

Hi, after reading this amazing paragraph i am too glad to share my knowledge here with friends.

my web page :: Home Tooth Whitening

Publicar un comentario