Este documento presenta 10 prácticas de programación avanzada realizadas por Dario López Díaz. Cada práctica introduce un nuevo concepto como variables numéricas, de caracteres, booleanas, constantes y tipos de datos como enteros, flotantes y doble precisión para almacenar y manipular diferentes tipos de datos.
Tuyển sinh khóa học giảng viên nguồn an toàn vệ sinh lao động mới nhất thanhbinh_90ns
Liên tục tuyển sinh đào tạo và cấp chứng nhận các khóa bồi dưỡng nghiệp vụ đấu thầu,tư vấn giám sát,quản lý dự án ,chỉ huy trưởng, tính toán và thiết kết cấu nhà cao tầng..,tập huấn nhà cao tầng : thi công,nghiệm thu và quản lý chất lượng công trình,khai hải quan….Tư vấn xin cấp chứng chỉ hành nghề,Sở xây dựng.
Chi tiết.Liên hệ :Ms.Thanh Bình:0985586382
Tuyển sinh khóa học giảng viên nguồn an toàn vệ sinh lao động mới nhất thanhbinh_90ns
Liên tục tuyển sinh đào tạo và cấp chứng nhận các khóa bồi dưỡng nghiệp vụ đấu thầu,tư vấn giám sát,quản lý dự án ,chỉ huy trưởng, tính toán và thiết kết cấu nhà cao tầng..,tập huấn nhà cao tầng : thi công,nghiệm thu và quản lý chất lượng công trình,khai hải quan….Tư vấn xin cấp chứng chỉ hành nghề,Sở xây dựng.
Chi tiết.Liên hệ :Ms.Thanh Bình:0985586382
1. PRACTICAS DE PROGRAMACION AVANZADA POR DARIO LOPEZ DIAZ
Practica 1
/**
* Desplegar un texto
* Dario Young
*
*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf ("Hola mundon n");
system ("PAUSE");
return 0;
}
2. Practica 2
/**
* Variables numericas
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
int num=34 ;
using namespace std;
int main ()
{
cout<< num << "n n" << endl;
system ("PAUSE");
return 0;
}
3. Practica 3
/**
* varialbes numericas (suma de dos numeros)
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
int num = 34;
int num2 = 5;
int suma= num + num2;
using namespace std;
int main ()
{
cout << suma << "n n" << endl;
system ("PAUSE");
return 0;
}
4. Practica 4
/**
* variables numerias (multiplicacion de dos numeros)
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
int num = 34;
int num2 = 5;
int multi= num * num2;
using namespace std;
int main ()
{
cout << multi << "n n" << endl;
system ("PAUSE");
return 0;
}
5. Practica 5
/**
* variables de tipo caracter de una sola letra utilizando solo comillas simples ('')
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
char letra = 'd';
int main ()
{
cout<< letra << "n n" << endl;
system ("PAUSE");
return 0;
}
6. Practica 6
/**
* cadena de caracteres utilizando "*" delante de char (char*) y utilizando comillas ("")
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
char* letra = "CodigoFacilito";
int main ()
{
cout<< letra << "n n" << endl;
system ("PAUSE");
return 0;
}
7. Practica 7
/**
* variable vooleana escribiendo "bool" una variable vooleana solo arroja dos resultados
verdadero o falso
* Dario Young
*
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
bool variable = false;
int main ()
{
cout<< variable << "n n" << endl;
system ("PAUSE");
return 0;
}
8. Practica 8
/**
* variables de tipo numerico con coma de tipo float(estas guardan numeros flotantes
de baja precision)
* Dario Young
*
*/
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{
float num = 2.567;
float num2 = 1.3;
cout<< num + num2 << endl;
getch ();
return 0;
}
9. Practica 9
/**
* variables numeras de tipo double que guarda numeros de alta precision
* Dario Young
*
*/
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
double num = 0.000004509098098234098234;
cout << num << endl;
getch();
return 0;
}
10. Practica 10
/**
* constantes (son como las variables solo que estas no pueden ser modificadas a lo
largo del programa)
* Dario Young
*
*/
#include <iostream>
#include <conio.h>
using namespace std;
const int num = 12;
int main()
{
cout << num << endl;
getch();
return 0;
}