Skip to content
Browse files

Scripts C

  • Loading branch information...
1 parent 59859a1 commit 26b616a09728ca0377319cece98a07339d4683e5 alex committed Apr 21, 2012
Showing with 146 additions and 54 deletions.
  1. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/10.1.c
  2. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/11.1.c
  3. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/11.2.c
  4. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/11.2a.c
  5. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/11.3.c
  6. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.1.c
  7. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.2.c
  8. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.3.c
  9. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.4.c
  10. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.5.c
  11. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/12.6.c
  12. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/13.1.c
  13. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/13.2.c
  14. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/14.1.c
  15. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/14.2.c
  16. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/14.3.c
  17. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/15.1.c
  18. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/15.2.c
  19. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/15.3.c
  20. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/16.1.c
  21. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/16.2.c
  22. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/16.3.c
  23. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/17.1.c
  24. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/17.2.c
  25. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/17.3.c
  26. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/17.4.c
  27. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.1.c
  28. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.10.c
  29. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.2.c
  30. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.3.c
  31. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.4.c
  32. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.5.c
  33. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.6.c
  34. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.7.c
  35. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.8.c
  36. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/18.9.c
  37. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.1.c
  38. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.2.c
  39. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.3.c
  40. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.4.c
  41. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.5.c
  42. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/19.6.c
  43. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/20.1.c
  44. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/20.2.c
  45. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/20.3.c
  46. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/20.4.c
  47. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/20.5.c
  48. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/21.1.c
  49. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/22.1.c
  50. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/23.1.c
  51. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/23.2.c
  52. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/23.3.c
  53. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/24.1.c
  54. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/24.2.c
  55. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/24.3.c
  56. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/24.4.c
  57. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/24.5.c
  58. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/25.1.c
  59. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/25.2.c
  60. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/25.3.c
  61. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/26.1.c
  62. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/26.2.c
  63. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/26.3.c
  64. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/26.4.c
  65. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/26.5.c
  66. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/7.1.c
  67. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/8.1.c
  68. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/8.2.c
  69. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/9.1.c
  70. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/9.2.c
  71. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/9.3.c
  72. 0 {Villatobas-1 → Alex-EJ-VLLTBS}/9.4.c
  73. +30 −0 FASSOO2-3/alg-27.c
  74. +5 −0 FASSOO2-3/ejerc-10.c
  75. +9 −3 FASSOO2-3/ejerc-12.c
  76. +11 −4 FASSOO2-3/ejerc-13.c
  77. +5 −0 FASSOO2-3/ejerc-14.c
  78. +29 −23 FASSOO2-3/ejerc-15.c
  79. +16 −4 FASSOO2-3/ejerc-16.c
  80. +31 −20 FASSOO2-3/ejerc-17.c
  81. +5 −0 FASSOO2-3/ejerc-8.c
  82. +5 −0 FASSOO2-3/ejerc-9.c
  83. BIN ejerc-17.exe
View
0 Villatobas-1/10.1.c → Alex-EJ-VLLTBS/10.1.c
File renamed without changes.
View
0 Villatobas-1/11.1.c → Alex-EJ-VLLTBS/11.1.c
File renamed without changes.
View
0 Villatobas-1/11.2.c → Alex-EJ-VLLTBS/11.2.c
File renamed without changes.
View
0 Villatobas-1/11.2a.c → Alex-EJ-VLLTBS/11.2a.c
File renamed without changes.
View
0 Villatobas-1/11.3.c → Alex-EJ-VLLTBS/11.3.c
File renamed without changes.
View
0 Villatobas-1/12.1.c → Alex-EJ-VLLTBS/12.1.c
File renamed without changes.
View
0 Villatobas-1/12.2.c → Alex-EJ-VLLTBS/12.2.c
File renamed without changes.
View
0 Villatobas-1/12.3.c → Alex-EJ-VLLTBS/12.3.c
File renamed without changes.
View
0 Villatobas-1/12.4.c → Alex-EJ-VLLTBS/12.4.c
File renamed without changes.
View
0 Villatobas-1/12.5.c → Alex-EJ-VLLTBS/12.5.c
File renamed without changes.
View
0 Villatobas-1/12.6.c → Alex-EJ-VLLTBS/12.6.c
File renamed without changes.
View
0 Villatobas-1/13.1.c → Alex-EJ-VLLTBS/13.1.c
File renamed without changes.
View
0 Villatobas-1/13.2.c → Alex-EJ-VLLTBS/13.2.c
File renamed without changes.
View
0 Villatobas-1/14.1.c → Alex-EJ-VLLTBS/14.1.c
File renamed without changes.
View
0 Villatobas-1/14.2.c → Alex-EJ-VLLTBS/14.2.c
File renamed without changes.
View
0 Villatobas-1/14.3.c → Alex-EJ-VLLTBS/14.3.c
File renamed without changes.
View
0 Villatobas-1/15.1.c → Alex-EJ-VLLTBS/15.1.c
File renamed without changes.
View
0 Villatobas-1/15.2.c → Alex-EJ-VLLTBS/15.2.c
File renamed without changes.
View
0 Villatobas-1/15.3.c → Alex-EJ-VLLTBS/15.3.c
File renamed without changes.
View
0 Villatobas-1/16.1.c → Alex-EJ-VLLTBS/16.1.c
File renamed without changes.
View
0 Villatobas-1/16.2.c → Alex-EJ-VLLTBS/16.2.c
File renamed without changes.
View
0 Villatobas-1/16.3.c → Alex-EJ-VLLTBS/16.3.c
File renamed without changes.
View
0 Villatobas-1/17.1.c → Alex-EJ-VLLTBS/17.1.c
File renamed without changes.
View
0 Villatobas-1/17.2.c → Alex-EJ-VLLTBS/17.2.c
File renamed without changes.
View
0 Villatobas-1/17.3.c → Alex-EJ-VLLTBS/17.3.c
File renamed without changes.
View
0 Villatobas-1/17.4.c → Alex-EJ-VLLTBS/17.4.c
File renamed without changes.
View
0 Villatobas-1/18.1.c → Alex-EJ-VLLTBS/18.1.c
File renamed without changes.
View
0 Villatobas-1/18.10.c → Alex-EJ-VLLTBS/18.10.c
File renamed without changes.
View
0 Villatobas-1/18.2.c → Alex-EJ-VLLTBS/18.2.c
File renamed without changes.
View
0 Villatobas-1/18.3.c → Alex-EJ-VLLTBS/18.3.c
File renamed without changes.
View
0 Villatobas-1/18.4.c → Alex-EJ-VLLTBS/18.4.c
File renamed without changes.
View
0 Villatobas-1/18.5.c → Alex-EJ-VLLTBS/18.5.c
File renamed without changes.
View
0 Villatobas-1/18.6.c → Alex-EJ-VLLTBS/18.6.c
File renamed without changes.
View
0 Villatobas-1/18.7.c → Alex-EJ-VLLTBS/18.7.c
File renamed without changes.
View
0 Villatobas-1/18.8.c → Alex-EJ-VLLTBS/18.8.c
File renamed without changes.
View
0 Villatobas-1/18.9.c → Alex-EJ-VLLTBS/18.9.c
File renamed without changes.
View
0 Villatobas-1/19.1.c → Alex-EJ-VLLTBS/19.1.c
File renamed without changes.
View
0 Villatobas-1/19.2.c → Alex-EJ-VLLTBS/19.2.c
File renamed without changes.
View
0 Villatobas-1/19.3.c → Alex-EJ-VLLTBS/19.3.c
File renamed without changes.
View
0 Villatobas-1/19.4.c → Alex-EJ-VLLTBS/19.4.c
File renamed without changes.
View
0 Villatobas-1/19.5.c → Alex-EJ-VLLTBS/19.5.c
File renamed without changes.
View
0 Villatobas-1/19.6.c → Alex-EJ-VLLTBS/19.6.c
File renamed without changes.
View
0 Villatobas-1/20.1.c → Alex-EJ-VLLTBS/20.1.c
File renamed without changes.
View
0 Villatobas-1/20.2.c → Alex-EJ-VLLTBS/20.2.c
File renamed without changes.
View
0 Villatobas-1/20.3.c → Alex-EJ-VLLTBS/20.3.c
File renamed without changes.
View
0 Villatobas-1/20.4.c → Alex-EJ-VLLTBS/20.4.c
File renamed without changes.
View
0 Villatobas-1/20.5.c → Alex-EJ-VLLTBS/20.5.c
File renamed without changes.
View
0 Villatobas-1/21.1.c → Alex-EJ-VLLTBS/21.1.c
File renamed without changes.
View
0 Villatobas-1/22.1.c → Alex-EJ-VLLTBS/22.1.c
File renamed without changes.
View
0 Villatobas-1/23.1.c → Alex-EJ-VLLTBS/23.1.c
File renamed without changes.
View
0 Villatobas-1/23.2.c → Alex-EJ-VLLTBS/23.2.c
File renamed without changes.
View
0 Villatobas-1/23.3.c → Alex-EJ-VLLTBS/23.3.c
File renamed without changes.
View
0 Villatobas-1/24.1.c → Alex-EJ-VLLTBS/24.1.c
File renamed without changes.
View
0 Villatobas-1/24.2.c → Alex-EJ-VLLTBS/24.2.c
File renamed without changes.
View
0 Villatobas-1/24.3.c → Alex-EJ-VLLTBS/24.3.c
File renamed without changes.
View
0 Villatobas-1/24.4.c → Alex-EJ-VLLTBS/24.4.c
File renamed without changes.
View
0 Villatobas-1/24.5.c → Alex-EJ-VLLTBS/24.5.c
File renamed without changes.
View
0 Villatobas-1/25.1.c → Alex-EJ-VLLTBS/25.1.c
File renamed without changes.
View
0 Villatobas-1/25.2.c → Alex-EJ-VLLTBS/25.2.c
File renamed without changes.
View
0 Villatobas-1/25.3.c → Alex-EJ-VLLTBS/25.3.c
File renamed without changes.
View
0 Villatobas-1/26.1.c → Alex-EJ-VLLTBS/26.1.c
File renamed without changes.
View
0 Villatobas-1/26.2.c → Alex-EJ-VLLTBS/26.2.c
File renamed without changes.
View
0 Villatobas-1/26.3.c → Alex-EJ-VLLTBS/26.3.c
File renamed without changes.
View
0 Villatobas-1/26.4.c → Alex-EJ-VLLTBS/26.4.c
File renamed without changes.
View
0 Villatobas-1/26.5.c → Alex-EJ-VLLTBS/26.5.c
File renamed without changes.
View
0 Villatobas-1/7.1.c → Alex-EJ-VLLTBS/7.1.c
File renamed without changes.
View
0 Villatobas-1/8.1.c → Alex-EJ-VLLTBS/8.1.c
File renamed without changes.
View
0 Villatobas-1/8.2.c → Alex-EJ-VLLTBS/8.2.c
File renamed without changes.
View
0 Villatobas-1/9.1.c → Alex-EJ-VLLTBS/9.1.c
File renamed without changes.
View
0 Villatobas-1/9.2.c → Alex-EJ-VLLTBS/9.2.c
File renamed without changes.
View
0 Villatobas-1/9.3.c → Alex-EJ-VLLTBS/9.3.c
File renamed without changes.
View
0 Villatobas-1/9.4.c → Alex-EJ-VLLTBS/9.4.c
File renamed without changes.
View
30 FASSOO2-3/alg-27.c
@@ -0,0 +1,30 @@
+// No compila.
+
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+ int i=0;
+ char cad[];
+ char cadinv[];
+ int lenght, mitad;
+
+ printf("Detector de palindromos.\nIntroduce una palabra: ");
+// scanf("%c", &cad);
+ gets(cad);
+ lenght = strlen(cad);
+ mitad = lenght/2;
+ for(; i<mitad; i++)
+ {
+ cadinv[i] = cad[lenght-i];
+ }
+// printf("%s %s\n", cadinv, cad);
+ if(cad = cadinv)
+ printf("Si es un palindromo\n");
+ else
+ printf("No es un palindromo\n");
+
+ system("pause");
+ return 0;
+}
View
5 FASSOO2-3/ejerc-10.c
@@ -1,3 +1,8 @@
+/*
+ Escribe en la pantalla del ordenador mediante un programa en lenguaje C
+ y utilizando el bucle do ... while “No faltaré sin causa justificada a clase”.
+*/
+
#include <stdio.h>
int main()
{
View
12 FASSOO2-3/ejerc-12.c
@@ -1,9 +1,15 @@
+/*
+ Escribe en la pantalla del ordenador mediante un programa en lenguaje C
+ y utilizando un #define MENSAJE “No faltaré sin causa justificada a clase”.
+*/
+
#include <stdio.h>
+
#define MENSAJE "No faltare sin causa justificada a clase"
int main()
{
- printf(MENSAJE"\n");
- system("pause");
- return 0;
+ printf(MENSAJE"\n");
+ system("pause");
+ return 0;
}
View
15 FASSOO2-3/ejerc-13.c
@@ -1,14 +1,21 @@
+/*
+ Escribe en la pantalla del ordenador mediante un programa en lenguaje C
+ y utilizando una funcion llamada recordatorio() que nos imprima el mensaje:
+ “No faltaré sin causa justificada a clase”.
+*/
+
#include <stdio.h>
+
#define MENSAJE "No faltare sin causa justificada a clase"
int recordatorio()
{
- printf(MENSAJE"\n");
+ printf(MENSAJE"\n");
}
int main()
{
- recordatorio();
- system("pause");
- return 0;
+ recordatorio();
+ system("pause");
+ return 0;
}
View
5 FASSOO2-3/ejerc-14.c
@@ -1,3 +1,8 @@
+/*
+Realiza un programa que nos muestre la diferencia entre el operador
+postincremento y preincremento.
+*/
+
#include <stdio.h>
int main ()
View
52 FASSOO2-3/ejerc-15.c
@@ -1,28 +1,34 @@
+/*
+Realiza el programa de una calculadora que nos este calculando
+operaciones aritméticas de dos números y nos pida la operación a realizar
+(incluye algún tipo de desplazamiento de bits) (0 para salir).
+*/
+
#include <stdio.h>
-int operando1, operando2;
-char operador;
int main()
{
- printf ("Calculadora Simple.\n");
- printf ("Introduce el primer numero: ");
- scanf ("%d", &operando1);
- while (getchar() !='\n');
- printf ("Introduce el segundo numero: ");
- scanf ("%d", &operando2);
- while (getchar () !='\n');
- printf ("Introduzca el operador (+, -, *, /): ");
- scanf ("%c", &operador);
- while (getchar () !='\n');
- printf ("El resultado es: ");
- switch (operador)
- {
- case '+': printf("%d\n", operando1 + operando2); break;
- case '-': printf("%d\n", operando1 - operando2); break;
- case '*': printf("%d\n", operando1 * operando2); break;
- case '/': printf("%d\n", operando1 / operando2); break;
- default: printf ("Error - Operador incorrecto"); break;
- }
- system("pause");
- return 0;
+ int operando1, operando2;
+ char operador;
+ printf ("Calculadora Simple.\n");
+ printf ("Introduce el primer numero: ");
+ scanf ("%d", &operando1);
+ while (getchar() !='\n');
+ printf ("Introduce el segundo numero: ");
+ scanf ("%d", &operando2);
+ while (getchar () !='\n');
+ printf ("Introduzca el operador (+, -, *, /): ");
+ scanf ("%c", &operador);
+ while (getchar () !='\n');
+ printf ("El resultado es: ");
+ switch (operador)
+ {
+ case '+': printf("%d\n", operando1 + operando2); break;
+ case '-': printf("%d\n", operando1 - operando2); break;
+ case '*': printf("%d\n", operando1 * operando2); break;
+ case '/': printf("%d\n", operando1 / operando2); break;
+ default: printf ("Error - Operador incorrecto"); break;
+ }
+ system("pause");
+ return 0;
}
View
20 FASSOO2-3/ejerc-16.c
@@ -1,12 +1,24 @@
+/*
+16. Declarar un array llamado conciencia de 100 elementos del tipo char.
+inicializalo con el mensaje “No faltaré sin causa justificada a clase”. Realizar
+la impresion del mismo de la siguiente forma y durante 3 ciclos:
+
+N
+No
+No f
+No fa
+...
+*/
+
#include <stdio.h>
int main()
{
int c=0,contador=0, max=1;
- char conciencia[100];
-// char conciencia[100] = {"No faltare sin causa justificada a clase"};
- printf("Escribe una frase\n");
- fgets(conciencia,100,stdin);
+ char conciencia[100] = {"No faltare sin causa justificada a clase"};
+// char conciencia[100];
+// printf("Escribe una frase\n");
+// fgets(conciencia,100,stdin);
int lenght= strlen(conciencia);
do
{
View
51 FASSOO2-3/ejerc-17.c
@@ -1,29 +1,40 @@
-// No compila.
+/*
+16. Declarar un array llamado conciencia de 100 elementos del tipo char.
+inicializalo con el mensaje “No faltaré sin causa justificada a clase”. Realizar
+la impresion del mismo continuamente y de la siguiente forma:
+
+N
+No
+No f
+No fa
+...
+*/
#include <stdio.h>
-#include <string.h>
int main()
{
- int i=0;
- char cad[];
- char cadinv[];
- int lenght, mitad;
-
- printf("Detector de palindromos.\nIntroduce una palabra: ");
-// scanf("%c", &cad);
- gets(cad);
- lenght = strlen(cad);
- mitad = lenght/2;
- for(; i<mitad; i++)
+ int contador=0, max=1;
+ char conciencia[100] = {"No faltare sin causa justificada a clase"};
+// char conciencia[100];
+// printf("Escribe una frase\n");
+// fgets(conciencia,100,stdin);
+ int lenght= strlen(conciencia);
+ do
{
- cadinv[i] = cad[lenght-i];
- }
-// printf("%s %s\n", cadinv, cad);
- if(cad = cadinv)
- printf("Si es un palindromo\n");
- else
- printf("No es un palindromo\n");
+ if (max<lenght)
+ {
+ for (;contador<max;contador++)
+ {
+ printf("%c",conciencia[contador]);
+ }
+ max++;
+ printf("\n");
+ contador=0;
+ }
+ else
+ max=0;
+ }while(1);
system("pause");
return 0;
View
5 FASSOO2-3/ejerc-8.c
@@ -1,3 +1,8 @@
+/*
+ Escribe en la pantalla del ordenador mediante un programa en lenguaje C
+ y utilizando el bucle for “No faltaré sin causa justificada a clase”.
+*/
+
#include <stdio.h>
int main()
View
5 FASSOO2-3/ejerc-9.c
@@ -1,3 +1,8 @@
+/*
+ Escribe en la pantalla del ordenador mediante un programa en lenguaje C
+ y utilizando el bucle while “No faltaré sin causa justificada a clase”.
+*/
+
#include <stdio.h>
int main()
View
BIN ejerc-17.exe
Binary file not shown.

0 comments on commit 26b616a

Please sign in to comment.
Something went wrong with that request. Please try again.