web viewsystem("pause>nul"); /* pausamos el proyecto y cuando hagamos click en...

3

Click here to load reader

Upload: lethuan

Post on 06-Feb-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web viewsystem("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */ }

#include <stdio.h> #include <conio.h> #include <cstdlib> /* Declaramos las librerias iniciales */ #include <iostream>#include <stdlib.h> #include <iomanip>// usar cin>> y color#include <math.h> #include <windows.h> //para usar sleepusing namespace std;// para no poner .h en algunas libreriasint opc; int main()

{

int HORA, MINUTO, SEGUNDO, ML;printf(" ************* Cronometro *********\n");printf(" ===================================== \n"); printf("1-.solucion con for\n"); printf("2-.solucion con while\n"); printf("3-.solucion con do while\n"); printf("\nPresiona una opcion=>"); scanf("%d",&opc);

if (opc==1) { for (HORA=0; HORA<1000; HORA++) { for (MINUTO=0; MINUTO<60; MINUTO++) { for (SEGUNDO=0; SEGUNDO<60; SEGUNDO++) { for (ML=0; ML<18.9; ML++) /* Hacemos for que hasta los 18.9 milesimas, en tiempo real serian 100 milesimas */ { system ("color 0f");cout <<setw(45)<<"CRONOMETRO \n " <<setw(41)<<"==========\n" <<setw(43)<<" DIGITAL \n " <<setw(44)<<"=======\n\n\n\n\n"; cout<<setw(43)<<"==============\n" <<setw(42)<<"===**FIME**===";cout <<setw(40)<< "\n"<<setw(30)<<" °°°°IVEE-1°°°°°°° "<< HORA <<":" << MINUTO <<":"<< SEGUNDO << "." << ML <<" <<°°°°°°°°°°°°°°°°"<< "\n" <<setw(43)<<"==============\n"<<setw(50)<<"==============\n\n\n\n\n\n\n\n"<<setw(80)<<"IV EE-1 Channels,Licla Russel"; system("cls"); } } } } system("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */ }

if (opc==2) { HORA=0;while(HORA<1000) { MINUTO=0; while (MINUTO<60) { SEGUNDO=0; while (SEGUNDO<60) { ML=0; while (ML<18.9) {system ("color 0c");//7->fondo blanco y 0--> color de texto negro

Page 2: Web viewsystem("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */ }

cout <<setw(45)<<"CRONOMETRO \n " <<setw(41)<<"==========\n" <<setw(43)<<" DIGITAL \n " <<setw(44)<<"=======\n\n\n\n\n"; cout<<setw(43)<<"==============\n" <<setw(42)<<"===**FIME**===";cout <<setw(40)<< "\n"<<setw(30)<<" °°°°IVEE-1°°°°°°° "<< HORA <<":" << MINUTO <<":"<< SEGUNDO << "." << ML <<" <<°°°°°°°°°°°°°°°°"<< "\n" <<setw(43)<<"==============\n"<<setw(50)<<"==============\n\n\n\n\n\n\n\n"<<setw(80)<<"IV EE-1 Channels,Licla Russel"; system("cls"); ML++; } SEGUNDO++; } MINUTO++; } HORA++; } system("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */ } if (opc==3){ HORA=0;do { MINUTO=0; do { SEGUNDO=0; do { ML=0; do { system ("color 0a");//7->fondo blanco y 0--> color de texto negro cout <<setw(45)<<"CRONOMETRO \n " <<setw(41)<<"==========\n" <<setw(42)<<" DIGITAL \n " <<setw(43)<<"=======\n\n\n\n\n"; cout<<setw(43)<<"==============\n" <<setw(42)<<"===**FIME**===";cout <<setw(40)<< "\n"<<setw(30)<<" °°°°IVEE-1°°°°°°° "<< HORA <<":" << MINUTO <<":"<< SEGUNDO << "." << ML <<" <<°°°°°°°°°°°°°°°°"<< "\n" <<setw(43)<<"==============\n"<<setw(50)<<"==============\n\n\n\n\n\n\n\n"<<setw(80)<<"IV EE-1 Channels,Licla Russel"; system("cls"); ML++; } while(ML<60); SEGUNDO++; } while(SEGUNDO<60); MINUTO++; } while(MINUTO<60); HORA++;}while(HORA<1000);

system("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */

Page 3: Web viewsystem("PAUSE>NUL"); /* Pausamos el proyecto y cuando hagamos click en cualquier tecla se cerrara */ }

} }