ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Programacion C


Enviado por   •  25 de Octubre de 2014  •  253 Palabras (2 Páginas)  •  140 Visitas

Página 1 de 2

#include<iostream>

#include<conio.h>

using namespace std;

int main(){

//PROBARLO TAL CUAL COMO ESTÁ, LUEGO LO MODIFICAN A SU GUSTO.

int x;

for( ;; ){

x=getch();

if(x==59) cout<<"jeje "; // en este caso F1. F2==60 F3==61 , ETC.

if(x==27)break; // Salir Al Pulsar La Letra Esc.

}

return 0;

}

#include <ctime>

#include <iostream>

using namespace std;

int main() {

time_t t = time(0); // get time now

struct tm * now = localtime( & t );

cout << (now->tm_year + 1900) << '-'

<< (now->tm_mon + 1) << '-'

<< now->tm_mday

<< endl;

}

#include <iostream>

#include <ctime>

using namespace std;

int main( )

{

// current date/time based on current system

time_t now = time(0);

cout << "Number of sec since January 1,1970:" << now << endl;

tm *ltm = localtime(&now);

// print various components of tm structure.

cout << "Year: "<< 1900 + ltm->tm_year << endl;

cout << "Month: "<< 1 + ltm->tm_mon<< endl;

cout << "Day: "<< ltm->tm_mday << endl;

cout << "Time: "<< 1 + ltm->tm_hour << ":";

cout << 1 + ltm->tm_min << ":";

...

Descargar como (para miembros actualizados)  txt (1.5 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com