miércoles, 4 de diciembre de 2019
Word 87
Enviar por corro electrónicoEscribe un blogCompartir con TwitterCompartir con FacebookCompartir en Pintere
Macros
Primero debemos elaborar una práctica sobre macros:
- Crear una Macro que escriba su nombre en una celda y lo ponga cursiva luego observar el Código.
- Crear una Macro que escriba un nombre en una celda y lo Subraye y observa el Código.
- Crear una Macro que escriba un nombre en una celda y cambie el tamaño de la letra a 24 puntos y observa el Código.
Códigos Más comunes:
Trasladarse a una Celda
Range("A1").Select
Escribir en una Celda
Activecell.FormulaR1C1="Ramon"
Letra Negrita
Selection.Font.Bold = True
Letra Cursiva
Selection.Font.Italic = True
Letra Subrayada
Selection.Font.Underline = xlUnderlineStyleSingle
Centrar Texto
With Selection
.HorizontalAlignment = xlCenter
End With
Alinear a la izquierda
With Selection
.HorizontalAlignment = xlLeft
End With
Alinear a la Derecha
With Selection
.HorizontalAlignment = xlRight
End With
Copiar
Selection.Copy
Pegar
ActiveSheet.Paste
Cortar
Selection.Cut
Ordenar Ascendente
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Orden Descendente
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Buscar
Cells.Find(What:="Ramon", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Insertar Fila
Selection.EntireRow.Insert
Eliminar Fila
Selection.EntireRow.Delete
Insertar Columna
Selection.EntireColumn.Insert
Eliminar Columna
Selection.EntireColumn.Delete
Tipo de Letra(Fuente)
With Selection.Font
.Name = "AGaramond"
End With
Tamaño de Letra(Tamaño de Fuente)
With Selection.Font
.Size = 15
End With
Abrir un Libro
Workbooks.Open Filename:="C:\Mis documentos\video safe 3.xls"
Grabar un Libro
ActiveWorkbook.SaveAs Filename:="C:\Mis documentos\piscis.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Estos son los códigos más comunes en Excel, usted puede ver mas códigos de otras opciones, es cuestión de que los ponga en práctica.
martes, 3 de diciembre de 2019
Examen de funciones
#include <stdio.h>
#include <iostream>
#include <windows.h>
using namespace std;
void menu();
void triangulo();
void circulo();
void cuadrado();
void salir();
float area,lado,base,altura,radio;
int opc;
int main(){
system("color F0");
menu();
}
void menu(){
do{
cout<<" ______________________"<<endl;
cout<<"| Menu de opciones |"<<endl;
cout<<"|1.Area triangulo |"<<endl;
cout<<"|2.Area de circulo |"<<endl;
cout<<"|3.Area del cuadrado |"<<endl;
cout<<"|4.Salir |"<<endl;
cout<<"|______________________|"<<endl;
cout<<"Ingrese la opcion que desea elegir:";
cin>>opc;
switch(opc){
case 1:{
triangulo();
menu();
break;
}
case 2:{
circulo();
break;
}
case 3:{
cuadrado();
break;
}
case 4:{
salir();
break;
}
default:{
cout<<"La opcion es incorrecta"<<endl;
system("pause");
system("cls");
menu();
break;
}
}
}while(opc != 4);
}
void triangulo(){
cout<<"Ingrese la base:";
cin>>base;
cout<<"Ingrese la altura:";
cin>>altura;
area=(base*altura)/2;
cout<<"El area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void circulo(){
cout<<"Ingrese el radio:";
cin>>radio;
area=3.1416*(radio*radio);
cout<<"el area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void cuadrado(){
cout<<"Ingrese la medida de un lado:";
cin>>lado;
area=lado*lado;
cout<<"El area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void salir(){
cout<<"Saliendo";
for(int i=0; i<=4; i++){
cout<<".";
Sleep(100);
}
}
#include <iostream>
#include <windows.h>
using namespace std;
void menu();
void triangulo();
void circulo();
void cuadrado();
void salir();
float area,lado,base,altura,radio;
int opc;
int main(){
system("color F0");
menu();
}
void menu(){
do{
cout<<" ______________________"<<endl;
cout<<"| Menu de opciones |"<<endl;
cout<<"|1.Area triangulo |"<<endl;
cout<<"|2.Area de circulo |"<<endl;
cout<<"|3.Area del cuadrado |"<<endl;
cout<<"|4.Salir |"<<endl;
cout<<"|______________________|"<<endl;
cout<<"Ingrese la opcion que desea elegir:";
cin>>opc;
switch(opc){
case 1:{
triangulo();
menu();
break;
}
case 2:{
circulo();
break;
}
case 3:{
cuadrado();
break;
}
case 4:{
salir();
break;
}
default:{
cout<<"La opcion es incorrecta"<<endl;
system("pause");
system("cls");
menu();
break;
}
}
}while(opc != 4);
}
void triangulo(){
cout<<"Ingrese la base:";
cin>>base;
cout<<"Ingrese la altura:";
cin>>altura;
area=(base*altura)/2;
cout<<"El area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void circulo(){
cout<<"Ingrese el radio:";
cin>>radio;
area=3.1416*(radio*radio);
cout<<"el area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void cuadrado(){
cout<<"Ingrese la medida de un lado:";
cin>>lado;
area=lado*lado;
cout<<"El area es:"<<area<<endl;
system("pause");
system("cls");
menu();
}
void salir(){
cout<<"Saliendo";
for(int i=0; i<=4; i++){
cout<<".";
Sleep(100);
}
}
jueves, 21 de noviembre de 2019
Examen de conversiones
#include <stdio.h>
#include <iostream>
#include <windows.h>
using namespace std;
int opc;
double cm,km,mm,pies,mts,byt,kb,mb,gb,tb,lts,cm3,m3,dm3;
int main(){
system("color F0");
do{
cout<<" ________________________"<<endl;
cout<<"| Menu de opciones |"<<endl;
cout<<"|1.-Longitud |"<<endl;
cout<<"|2.-Informacion |"<<endl;
cout<<"|3.-Capacidad |"<<endl;
cout<<"|4.-Salir |"<<endl;
cout<<"|________________________|"<<endl;
cout<<"Escoja la opcion que desea calcular:";
cin>>opc;
switch(opc){
case 1:{
cout<<"Ingrese la medida en metros:";
cin>>mts;
km=mts/1000;
cm=mts*100;
pies=mts*3.28;
mm=mts*1000;
cout<<"Los metros son:"<<mts<<endl;
cout<<"Los kilometros son:"<<km<<endl;
cout<<"Los milimetros son:"<<mm<<endl;
cout<<"Los centrimetros son:"<<cm<<endl;
cout<<"Los pies son:"<<pies<<endl;
system("pause");
system("cls");
break;
}
case 2:{
cout<<"Ingrese las medidas en bytes:";
cin>>byt;
kb=byt/1024;
mb=byt/1048576;
gb=byt/1073741824;
tb=gb/1000;
cout<<"Los bytes son:"<<byt<<endl;
cout<<"Los kilobytes son:"<<kb<<endl;
cout<<"Los megabytes son:"<<mb<<endl;
cout<<"Los terabytes son:"<<tb<<endl;
system("pause");
system("cls");
break;
}
case 3:{
cout<<"Ingrese la medida en litros:";
cin>>lts;
cm3=lts*100;
m3=lts/100;
cout<<"Los litros son:"<<lts<<endl;
cout<<"Los centimetros cubicos son:"<<cm3<<endl;
cout<<"Los diametros cubicos son:"<<lts<<endl;
cout<<"Los metros cubicos son:"<<m3<<endl;
system("pause");
system("cls");
break;
}
case 4:{
cout<<"Saliendo";
for(int i=0; i<=5; i++){
cout<<".";
Sleep(100);
}
break;
}
}
}while (opc != 4);
}
#include <iostream>
#include <windows.h>
using namespace std;
int opc;
double cm,km,mm,pies,mts,byt,kb,mb,gb,tb,lts,cm3,m3,dm3;
int main(){
system("color F0");
do{
cout<<" ________________________"<<endl;
cout<<"| Menu de opciones |"<<endl;
cout<<"|1.-Longitud |"<<endl;
cout<<"|2.-Informacion |"<<endl;
cout<<"|3.-Capacidad |"<<endl;
cout<<"|4.-Salir |"<<endl;
cout<<"|________________________|"<<endl;
cout<<"Escoja la opcion que desea calcular:";
cin>>opc;
switch(opc){
case 1:{
cout<<"Ingrese la medida en metros:";
cin>>mts;
km=mts/1000;
cm=mts*100;
pies=mts*3.28;
mm=mts*1000;
cout<<"Los metros son:"<<mts<<endl;
cout<<"Los kilometros son:"<<km<<endl;
cout<<"Los milimetros son:"<<mm<<endl;
cout<<"Los centrimetros son:"<<cm<<endl;
cout<<"Los pies son:"<<pies<<endl;
system("pause");
system("cls");
break;
}
case 2:{
cout<<"Ingrese las medidas en bytes:";
cin>>byt;
kb=byt/1024;
mb=byt/1048576;
gb=byt/1073741824;
tb=gb/1000;
cout<<"Los bytes son:"<<byt<<endl;
cout<<"Los kilobytes son:"<<kb<<endl;
cout<<"Los megabytes son:"<<mb<<endl;
cout<<"Los terabytes son:"<<tb<<endl;
system("pause");
system("cls");
break;
}
case 3:{
cout<<"Ingrese la medida en litros:";
cin>>lts;
cm3=lts*100;
m3=lts/100;
cout<<"Los litros son:"<<lts<<endl;
cout<<"Los centimetros cubicos son:"<<cm3<<endl;
cout<<"Los diametros cubicos son:"<<lts<<endl;
cout<<"Los metros cubicos son:"<<m3<<endl;
system("pause");
system("cls");
break;
}
case 4:{
cout<<"Saliendo";
for(int i=0; i<=5; i++){
cout<<".";
Sleep(100);
}
break;
}
}
}while (opc != 4);
}
viernes, 8 de noviembre de 2019
miércoles, 6 de noviembre de 2019
Programa 26(Firma)
#include <stdio.h>
#include <iostream>
#include <windows.h>
#include <time.h>
using namespace std;
void gotoxy(int x,int y){
HANDLE hcon;
hcon=GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwpos;
dwpos.X=x;
dwpos.Y=y;
SetConsoleCursorPosition(hcon, dwpos);
}
void completado();
void calcular();
void impresion();
float mat[5][5],x=5,y=8,n=0;
int main(){
system("color F0");
completado();
calcular();
impresion();
}
void completado(){
int n;
srand(time(NULL));
for(int i=0; i<=3; i++){
for(int j=0; j<=3; j++){
n=rand()/1000;
mat[i][j]=n;
}
}
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
gotoxy(x,y);
cout<<mat[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
system("cls");
}
void calcular(){
mat[0][4]=mat[0][0]+mat[0][1]+mat[0][2]+mat[0][3];
mat[0][4]=mat[0][4]/4;
mat[1][4]=mat[1][0]+mat[1][1]+mat[1][2]+mat[1][3];
mat[1][4]=mat[1][4]/4;
mat[2][4]=mat[2][0]+mat[2][1]+mat[2][2]+mat[2][3];
mat[2][4]=mat[2][4]/4;
mat[3][4]=mat[3][0]+mat[3][1]+mat[3][2]+mat[3][3];
mat[3][4]=mat[3][4]/4;
mat[4][0]=mat[0][0]+mat[1][0]+mat[2][0]+mat[3][0];
mat[4][0]=mat[4][0]/4;
mat[4][1]=mat[0][1]+mat[1][1]+mat[2][1]+mat[3][1];
mat[4][1]=mat[4][1]/4;
mat[4][2]=mat[0][2]+mat[1][2]+mat[2][2]+mat[3][2];
mat[4][2]=mat[4][2]/4;
mat[4][3]=mat[0][3]+mat[1][3]+mat[2][3]+mat[3][3];
mat[4][3]=mat[4][3]/4;
mat[4][4]=mat[0][4]+mat[1][4]+mat[2][4]+mat[3][4];
mat[4][4]=mat[4][4]/4;
system("pause");
system("cls");
}
void impresion(){
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
gotoxy(x,y);
cout<<mat[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
for(int i=1; i<=1; i++){
gotoxy(36,i);
for(int i=0; i<=0; i++){
cout<<"B";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"b";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"M";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"e";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"d";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"i";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"n";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"C";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"l";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"o";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"s ";
Sleep(100);
}
}
system("pause");
system("cls");
}
#include <iostream>
#include <windows.h>
#include <time.h>
using namespace std;
void gotoxy(int x,int y){
HANDLE hcon;
hcon=GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwpos;
dwpos.X=x;
dwpos.Y=y;
SetConsoleCursorPosition(hcon, dwpos);
}
void completado();
void calcular();
void impresion();
float mat[5][5],x=5,y=8,n=0;
int main(){
system("color F0");
completado();
calcular();
impresion();
}
void completado(){
int n;
srand(time(NULL));
for(int i=0; i<=3; i++){
for(int j=0; j<=3; j++){
n=rand()/1000;
mat[i][j]=n;
}
}
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
gotoxy(x,y);
cout<<mat[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
system("cls");
}
void calcular(){
mat[0][4]=mat[0][0]+mat[0][1]+mat[0][2]+mat[0][3];
mat[0][4]=mat[0][4]/4;
mat[1][4]=mat[1][0]+mat[1][1]+mat[1][2]+mat[1][3];
mat[1][4]=mat[1][4]/4;
mat[2][4]=mat[2][0]+mat[2][1]+mat[2][2]+mat[2][3];
mat[2][4]=mat[2][4]/4;
mat[3][4]=mat[3][0]+mat[3][1]+mat[3][2]+mat[3][3];
mat[3][4]=mat[3][4]/4;
mat[4][0]=mat[0][0]+mat[1][0]+mat[2][0]+mat[3][0];
mat[4][0]=mat[4][0]/4;
mat[4][1]=mat[0][1]+mat[1][1]+mat[2][1]+mat[3][1];
mat[4][1]=mat[4][1]/4;
mat[4][2]=mat[0][2]+mat[1][2]+mat[2][2]+mat[3][2];
mat[4][2]=mat[4][2]/4;
mat[4][3]=mat[0][3]+mat[1][3]+mat[2][3]+mat[3][3];
mat[4][3]=mat[4][3]/4;
mat[4][4]=mat[0][4]+mat[1][4]+mat[2][4]+mat[3][4];
mat[4][4]=mat[4][4]/4;
system("pause");
system("cls");
}
void impresion(){
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
gotoxy(x,y);
cout<<mat[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
for(int i=1; i<=1; i++){
gotoxy(36,i);
for(int i=0; i<=0; i++){
cout<<"B";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"b";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"M";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"e";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"d";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"i";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"n";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"C";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"l";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"o";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"s ";
Sleep(100);
}
}
system("pause");
system("cls");
}
Suscribirse a:
Entradas (Atom)
