Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
Alvin Jacobs
2,096 views
Informática ii ejercicios resueltos - practica 3
Education
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Downloaded 23 times
1
/ 12
2
/ 12
3
/ 12
4
/ 12
5
/ 12
6
/ 12
7
/ 12
8
/ 12
9
/ 12
10
/ 12
11
/ 12
12
/ 12
More Related Content
PDF
Ejercicios resueltos Practica 4 informatica II
by
Alvin Jacobs
DOCX
Cómo crear una calculadora js jv-ng
by
gzuz sanchez
DOCX
Hace una calculadora en jeank
by
HumbertoWuwu
DOCX
JAVA Program in NetBeans
by
HimanshiSingh71
DOCX
Rut
by
Rudy Medina
TXT
Juego del gato
by
julian javier solis herrera
DOCX
Guia informática 2 contestada
by
Fernando Omar Arciniega Martinez
DOCX
Informática I: Ejercicios Resueltos
by
Alvin Jacobs
Ejercicios resueltos Practica 4 informatica II
by
Alvin Jacobs
Cómo crear una calculadora js jv-ng
by
gzuz sanchez
Hace una calculadora en jeank
by
HumbertoWuwu
JAVA Program in NetBeans
by
HimanshiSingh71
Rut
by
Rudy Medina
Juego del gato
by
julian javier solis herrera
Guia informática 2 contestada
by
Fernando Omar Arciniega Martinez
Informática I: Ejercicios Resueltos
by
Alvin Jacobs
Viewers also liked
PDF
Ejercicios resueltos informática II practica 1 (nueva 2014)
by
Alvin Jacobs
PPTX
Solución de problemas con algoritmos
by
Jeckson Enrique Loza Arenas
PDF
21 problemas de algoritmo resueltos
by
Roldan El Gato
PDF
Ejercicios Excel Básico
by
Patricia Ferrer
PDF
Ejercicios informatica
by
royers500
PDF
Informática ii – practica 2
by
Alvin Jacobs
ODT
informatica ejercicio procesador
by
zakarlaxD
ODT
Ejercicios de informática
by
xoxebodyboard
PPT
PROGRAMACIÓN DE ALGORTIMOS (II Bimestre Abril Agosto 2011)
by
Videoconferencias UTPL
DOCX
Ejercicios de algortimos
by
Maria Gabriela Maldonado
PDF
Soluciones ejercicios informática.
by
LPunteros
PPTX
Icfe sahuayo clase informatica 2 primera sesión
by
Yuseff Bladeshark
DOCX
Ejercicios de informatica
by
Richrad Alexander Valarezo Avila
PPT
Curso Excel Intermedio: Unidad E10
by
Guillermo Díaz
PPT
Curso Básico Excel - Unidad 6
by
Guillermo Díaz
PDF
ejercicios resueltos de algebra del cbc guia 2
by
apuntescbc
PDF
ResolucióN De Problemas
by
guest796d29
PPTX
algoritmos, pseudocódigos y diagrama de flujo
by
laurabernier14
DOCX
Examen de informatica i
by
Constantino Simon Jose
PPSX
Taller de informática básica II
by
Laura Fernández
Ejercicios resueltos informática II practica 1 (nueva 2014)
by
Alvin Jacobs
Solución de problemas con algoritmos
by
Jeckson Enrique Loza Arenas
21 problemas de algoritmo resueltos
by
Roldan El Gato
Ejercicios Excel Básico
by
Patricia Ferrer
Ejercicios informatica
by
royers500
Informática ii – practica 2
by
Alvin Jacobs
informatica ejercicio procesador
by
zakarlaxD
Ejercicios de informática
by
xoxebodyboard
PROGRAMACIÓN DE ALGORTIMOS (II Bimestre Abril Agosto 2011)
by
Videoconferencias UTPL
Ejercicios de algortimos
by
Maria Gabriela Maldonado
Soluciones ejercicios informática.
by
LPunteros
Icfe sahuayo clase informatica 2 primera sesión
by
Yuseff Bladeshark
Ejercicios de informatica
by
Richrad Alexander Valarezo Avila
Curso Excel Intermedio: Unidad E10
by
Guillermo Díaz
Curso Básico Excel - Unidad 6
by
Guillermo Díaz
ejercicios resueltos de algebra del cbc guia 2
by
apuntescbc
ResolucióN De Problemas
by
guest796d29
algoritmos, pseudocódigos y diagrama de flujo
by
laurabernier14
Examen de informatica i
by
Constantino Simon Jose
Taller de informática básica II
by
Laura Fernández
More from Alvin Jacobs
PDF
Carbohidratos 14 22_1589
by
Alvin Jacobs
PDF
3er parcialito
by
Alvin Jacobs
PDF
Ejercicios resueltos practica 2 (nueva 2014) informática ii
by
Alvin Jacobs
DOCX
Preguntas para final de Etica
by
Alvin Jacobs
PDF
Probabilidad y Estadistica Para Ingenieros 6ta Edicion - Ronald E. Walpole ...
by
Alvin Jacobs
PDF
Informática I: Ejercicios Resueltos
by
Alvin Jacobs
PDF
Practica 1 informática ii
by
Alvin Jacobs
PDF
Ingeco unidad 4
by
Alvin Jacobs
PDF
Ingeco unidad 2
by
Alvin Jacobs
PDF
Ingeco unidad 1
by
Alvin Jacobs
PDF
Resumen introducción a la filosofía y antropología filosófica 2º parcia...
by
Alvin Jacobs
Carbohidratos 14 22_1589
by
Alvin Jacobs
3er parcialito
by
Alvin Jacobs
Ejercicios resueltos practica 2 (nueva 2014) informática ii
by
Alvin Jacobs
Preguntas para final de Etica
by
Alvin Jacobs
Probabilidad y Estadistica Para Ingenieros 6ta Edicion - Ronald E. Walpole ...
by
Alvin Jacobs
Informática I: Ejercicios Resueltos
by
Alvin Jacobs
Practica 1 informática ii
by
Alvin Jacobs
Ingeco unidad 4
by
Alvin Jacobs
Ingeco unidad 2
by
Alvin Jacobs
Ingeco unidad 1
by
Alvin Jacobs
Resumen introducción a la filosofía y antropología filosófica 2º parcia...
by
Alvin Jacobs
Informática ii ejercicios resueltos - practica 3
1.
1 Informática
II: Ejercicios Resueltos Practica 3 Tabla de contenido Ejercicio 1 ......................................................................................................................................... 1 Ejercicio 2 ......................................................................................................................................... 1 Ejercicio 3 ......................................................................................................................................... 2 Ejercicio 4 ......................................................................................................................................... 2 Ejercicio 5 ......................................................................................................................................... 3 Ejercicio 6 ......................................................................................................................................... 4 Ejercicio 7 ......................................................................................................................................... 5 Ejercicio 8 ......................................................................................................................................... 6 Ejercicio 9 ......................................................................................................................................... 6 Ejercicio 10 ...................................................................................................................................... 7 Ejercicio 11 ...................................................................................................................................... 8 Ejercicio 12 .................................................................................................................................... 10 Ejercicio 13 .................................................................................................................................... 10 Ejercicio 1 #include <stdio.h> #include <stdlib.h> void cambiar(int*,int*); int main() { int a=100,b=200; printf("Valores originales:na=%dnb=%dn",a,b); cambiar(&a,&b); printf("Valores luego de la funcion:na=%dnb=%dn",a,b); return 0; } void cambiar (int * pa,int * pb) { int aux; aux=(*pa); (*pa)=(*pb); (*pb)=aux; } Ejercicio 2 #include <stdio.h> #include <stdlib.h> int * posicion (int[],int);
2.
2 int
main() { int arr[5]={1,3,5,7,9}; int i=0; printf("Direccion del primer elemento del arreglo:%dnIngrese la posicion(0-4) de la cual desea conoser la direccion:n", arr); scanf("%d", &i); printf("Direccion: %d", posicion(arr,i)); return 0; } int * posicion (int arr[], int i) { return (arr+i); } Ejercicio 3 #include <stdio.h> #include <stdlib.h> void redondear (double *); int main() { double num=10.7; printf("Numero original: %.2lfn",num); redondear(&num); printf("Numero redondeado: %.2lf",num); return 0; } void redondear (double *pnum) { int aux; aux=(*pnum); if(((*pnum)-aux)<0.5) (*pnum)=aux; else (*pnum)=aux+1; } Ejercicio 4 #include <stdio.h> #include <stdlib.h> typedef struct { int numero, valor; char palo; } t_carta; void ordenar (t_carta *,t_carta *,t_carta *);
3.
3 int
main() { t_carta c1= {1,1,'e'},c2= {7,3,'e'},c3= {1,2,'b'}; printf("Orden original: %d%c_%d%c_%d%cn",c1.numero,c1.palo,c2.numero,c2.palo,c3.numero,c3.palo); ordenar(&c1,&c2,&c3); printf("Luego de ordenadas: %d%c_%d%c_%d%cn",c1.numero,c1.palo,c2.numero,c2.palo,c3.numero,c3.palo); return 0; } void ordenar (t_carta * p1,t_carta * p2,t_carta * p3) { t_carta aux; if((p1->valor)>(p2->valor)) { aux=(*p2); (*p2)=(*p1); (*p1)=aux; } if((p1->valor)>(p3->valor)) { aux=(*p3); (*p3)=(*p1); (*p1)=aux; } if((p2->valor)>(p3->valor)) { aux=(*p3); (*p3)=(*p2); (*p2)=aux; } } Ejercicio 5 #include <stdio.h> #include <stdlib.h> typedef struct { int a, b, c, d; } t_cuatro; void ordenar (t_cuatro *); int main() { t_cuatro var={15,3,8,10}; printf("Variable original: %d_%d_%d_%dn",var.a,var.b,var.c,var.d); ordenar(&var); printf("Variable Ordenada: %d_%d_%d_%dn",var.a,var.b,var.c,var.d); return 0;
4.
4 } void
ordenar (t_cuatro * pvar) { int aux; if((pvar->a)>(pvar->d)) { aux=pvar->d; pvar->d=pvar->a; pvar->a=aux; } if((pvar->a)>(pvar->c)) { aux=pvar->c; pvar->c=pvar->a; pvar->a=aux; } if((pvar->a)>(pvar->b)) { aux=pvar->b; pvar->b=pvar->a; pvar->a=aux; } if((pvar->b)>(pvar->d)) { aux=pvar->d; pvar->d=pvar->b; pvar->b=aux; } if((pvar->b)>(pvar->c)) { aux=pvar->c; pvar->c=pvar->b; pvar->b=aux; } if((pvar->c)>(pvar->d)) { aux=pvar->d; pvar->d=pvar->c; pvar->c=aux; } } Ejercicio 6 #include <stdio.h> #include <stdlib.h> typedef struct { int n, o , p, q, r, s, t, u, v, w, x, y, z; char p1[100], p2[200], p3[300], p4[400], p5[500]; double a, b, c, d, e, f, g, h, i, j, k, l, m; } t_varios; void ordenar (t_varios *,t_varios *);
5.
5 int
main() { t_varios v1, v2; printf("Variables originales(solo n): %d_%dn", v1.n , v2.n); ordenar(&v1,&v2); printf("Variables Ordenadas(solo n): %d_%dn", v1.n , v2.n); return 0; } void ordenar (t_varios * pv1,t_varios *pv2) { t_varios aux; aux=(*pv1); (*pv1)=(*pv2); (*pv2)=aux; } Ejercicio 7 #include <stdio.h> #include <stdlib.h> #include <conio.h> char * ingresar_frace(void); int main() { char * fr; fr=ingresar_frace(); printf("n%sn",fr); free(fr); return 0; } char * ingresar_frace(void) { char* fr; char l; int i=0,j=10; fr=(char *)malloc(sizeof(char)*j); printf("Ingrese la frace:n"); while((i<j)&&(l!='r')) { l=getche(); if(l!='r') { *(fr+i)=l; i++; } if(i>=j) { j+=10; fr=(char *)realloc(fr,sizeof(char)*j); } }
6.
6 *(fr+i)='0'; fr=(char
*)realloc(fr,sizeof(char)*(i+1)); return fr; } Ejercicio 8 #include <stdio.h> #include <stdlib.h> char * savestr (char[]); int main() { char arr[28]="El texto a mostrar va aqui."; char * fr; printf("%sn", arr); fr=savestr(arr); printf("%sn", fr); free(fr); return 0; } char * savestr (char arr[]) { int i=0,j=10; char * fr=(char*)malloc(sizeof(char)*j); while((i<j)&&(arr[i]!='0')) { *(fr+i)=arr[i]; i++; if(i>=j) { j+=10; fr=(char*)realloc(fr,sizeof(char)*j); } } *(fr+i)='0'; fr=(char*)realloc(fr,sizeof(char)*(i+1)); return fr; } Ejercicio 9 #include <stdio.h> #include <stdlib.h> char * subcadena (char * , unsigned int , unsigned int ); int main() { char * r; r=subcadena("Universidad Catolica Argentina", 8, 5);
7.
7 if(r!=NULL) printf("%sn",
r ); free(r); return 0; } char * subcadena (char * p, unsigned int i, unsigned int n) { int a=0; char * r; for(a=0; (a<i)&&(*(p+a)!='0'); a++); if(*(p+a)=='0') return NULL; else { r=(char *)malloc(sizeof(char)*n); for(a=0; (a<n)&&(*(p+i+a)!='0'); a++) { *(r+a)=*(p+i+a); } *(r+a)='0'; if(*(p+i+a)=='0') r=(char*)realloc(r,sizeof(char)*(a+1)); return r; } } Ejercicio 10 #include <stdio.h> #include <stdlib.h> typedef struct { char * txt; unsigned int longitud; } t_texto; void savetxtstruct (t_texto *); char * ingresar_frace(void); int main() { t_texto texto; savetxtstruct(&texto); printf("Texto: %snLongitud: %dn", texto.txt,texto.longitud); free(texto.txt); return 0; } void savetxtstruct (t_texto * ptxt) {
8.
8 int
i; ptxt->txt=ingresar_frace(); i=0; while(*((ptxt->txt) +i)!='0') i++; ptxt->longitud=i; } char * ingresar_frace(void) { char* fr; char l='a'; int i=0,j=10; fr=(char *)malloc(sizeof(char)*j); printf("nIngrese la frace:n"); while((i<j)&&(l!='r')) { l=getche(); if(l!='r') { *(fr+i)=l; i++; } if(i>=j) { j+=10; fr=(char *)realloc(fr,sizeof(char)*j); } } *(fr+i)='0'; fr=(char *)realloc(fr,sizeof(char)*(i+1)); return fr; } Ejercicio 11 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char contenido; unsigned int descubierto; } t_casillero; int main() { t_casillero bm[N][N]= { {{'0',0},{'0',0},{'1',0},{'1',0},{'1',0},{'0',0},{'1',0},{'1',0},{'1',0},{'0',0}}, {{'0',0},{'0',0},{'1',0},{'*',0},{'1',0},{'0',0},{'1',0},{'*',0},{'1',0},{'0',0}}, {{'0',0},{'1',0},{'2',0},{'2',0},{'1',0},{'0',0},{'2',0},{'2',0},{'2',0},{'0',0}}, {{'0',0},{'1',0},{'*',0},{'1',0},{'0',0},{'0',0},{'1',0},{'*',0},{'1',0},{'0',0}},
9.
9 {{'1',0},{'2',0},{'1',0},{'1',0},{'1',0},{'1',0},{'2',0},{'1',0},{'1',0},{'0',0}}, {{'*',0},{'1',0},{'0',0},{'0',0},{'1',0},{'*',0},{'1',0},{'0',0},{'0',0},{'0',0}}, {{'1',0},{'2',0},{'1',0},{'1',0},{'1',0},{'1',0},{'1',0},{'0',0},{'0',0},{'0',0}}, {{'0',0},{'1',0},{'*',0},{'1',0},{'1',0},{'1',0},{'1',0},{'0',0},{'0',0},{'0',0}}, {{'0',0},{'2',0},{'2',0},{'2',0},{'1',0},{'*',0},{'1',0},{'1',0},{'1',0},{'1',0}}, {{'0',0},{'1',0},{'*',0},{'1',0},{'1',0},{'1',0},{'1',0},{'1',0},{'*',0},{'1',0}} }; int
i,j,x,y; printf("nnnnnnnnnnnn"); do { for(i=0; i<N; i++) { for(j=0; j<N; j++) { if(bm[i][j].descubierto) printf("[ %c ]",bm[i][j].contenido); else printf(":%d,%d:",i,j); } printf("n"); } printf("nIngrese la casilla que quiere revisar:n"); printf("nX="); scanf("%d", &x); printf("Y="); scanf("%d", &y); bm[x][y].descubierto=1; printf("nnnnnnnnnnnn"); } while(bm[x][y].contenido!='*'); for(i=0; i<N; i++) { for(j=0; j<N; j++) { if(bm[i][j].descubierto) printf("[ %c ]",bm[i][j].contenido); else printf(":%d,%d:",i,j); } printf("n"); } if(bm[x][y].contenido!='*') { for(i=0; i<N; i++) printf("FELICIDADES! HA GANADO!n"); } else { for(i=0; i<N*N; i++) printf("KABOOM!"); } return 0;
10.
10 } Ejercicio
12 #include <stdio.h> #include <stdlib.h> typedef struct { int a, b; }t_dosint; void cdosint (t_dosint *); int main() { t_dosint dosint={145,537}; printf("Valores orinigales:na=%dnb=%dn",dosint.a,dosint.b); cdosint(&dosint); printf("Valores luego del cambio:na=%dnb=%dn",dosint.a,dosint.b); return 0; } void cdosint (t_dosint * pdosint) { cambiar(&(pdosint->a),&(pdosint->b)); } void cambiar (int * pa,int * pb) { int aux; aux=(*pa); (*pa)=(*pb); (*pb)=aux; } Ejercicio 13 #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <string.h> typedef struct { char * txt; unsigned int longitud; } t_texto; t_texto * cargar_fraces (void); char * ingresar_frace(void); void savetxtstruct(t_texto *); void ordenar_fraces(t_texto *); void imprimir_fraces (t_texto *); int main() {
11.
11 t_texto
* fraces; fraces=cargar_fraces(); printf("Fraces sin ordenar: n"); imprimir_fraces(fraces); ordenar_fraces(fraces); printf("nFraces ordenadas: n"); imprimir_fraces(fraces); return 0; } void savetxtstruct (t_texto * ptxt) { int i; ptxt->txt=ingresar_frace(); i=0; while(*((ptxt->txt) +i)!='0') i++; ptxt->longitud=i; } char * ingresar_frace(void) { char* fr; char l='a'; int i=0,j=10; fr=(char *)malloc(sizeof(char)*j); printf("nIngrese la frace:n"); while((i<j)&&(l!='r')) { l=getche(); if(l!='r') { *(fr+i)=l; i++; } if(i>=j) { j+=10; fr=(char *)realloc(fr,sizeof(char)*j); } } *(fr+i)='0'; fr=(char *)realloc(fr,sizeof(char)*(i+1)); return fr; } t_texto * cargar_fraces (void) { int i=0, j=10; t_texto * fraces=(t_texto *)malloc(sizeof(t_texto)*j); do { if(i>j) { j+=10;
12.
12 fraces=(t_texto
*)realloc(fraces,sizeof(t_texto)*j); } savetxtstruct(&(*(fraces+i))); if((fraces+i)->longitud!=0) i++; }while((fraces+i)->longitud!=0); (fraces+i)->txt=NULL; return fraces; } void ordenar_fraces(t_texto * fraces) { int i,j; t_texto aux; for(i=0;(fraces+i)->txt!=NULL;i++) { for(j=i+1;(fraces+j)->txt!=NULL;j++) { if(strcmp((fraces+i)->txt,(fraces+j)->txt)>0) { aux=*(fraces+i); *(fraces+i)=*(fraces+j); *(fraces+j)=aux; } } } } void imp_frace (t_texto frace) { printf("%sn", frace.txt); } void imprimir_fraces (t_texto * fraces) { int i; for(i=0;(fraces+i)->txt!=NULL;i++) { imp_frace(*(fraces+i)); } }
Download