-
Entradas recientes
Blog Stats
- 885.410 hits
Enlaces
Archivos
- enero 2024
- diciembre 2023
- noviembre 2023
- octubre 2023
- septiembre 2023
- May 2023
- enero 2023
- diciembre 2022
- noviembre 2022
- octubre 2022
- febrero 2022
- enero 2022
- diciembre 2021
- noviembre 2021
- octubre 2021
- septiembre 2021
- enero 2021
- diciembre 2020
- noviembre 2020
- octubre 2020
- febrero 2020
- enero 2020
- diciembre 2019
- noviembre 2019
- octubre 2019
- septiembre 2019
- febrero 2019
- enero 2019
- diciembre 2018
- noviembre 2018
- octubre 2018
- septiembre 2018
- febrero 2018
- enero 2018
- diciembre 2017
- noviembre 2017
- septiembre 2017
- febrero 2017
- enero 2017
- diciembre 2016
- noviembre 2016
- septiembre 2016
- febrero 2016
- enero 2016
- diciembre 2015
- noviembre 2015
- octubre 2015
- febrero 2015
- enero 2015
- diciembre 2014
- noviembre 2014
- octubre 2014
- septiembre 2014
- febrero 2014
- enero 2014
- diciembre 2013
- noviembre 2013
- octubre 2013
- septiembre 2013
- febrero 2013
- enero 2013
- diciembre 2012
- noviembre 2012
- octubre 2012
- septiembre 2012
- febrero 2012
- enero 2012
- diciembre 2011
- noviembre 2011
- octubre 2011
- septiembre 2011
- febrero 2011
- enero 2011
- diciembre 2010
- noviembre 2010
- octubre 2010
- septiembre 2010
- julio 2010
- junio 2010
- May 2010
- abril 2010
- marzo 2010
- febrero 2010
- enero 2010
- diciembre 2009
- noviembre 2009
- octubre 2009
- septiembre 2009
- julio 2009
- junio 2009
- May 2009
- abril 2009
- marzo 2009
- febrero 2009
- enero 2009
- diciembre 2008
- noviembre 2008
- octubre 2008
- septiembre 2008
- junio 2008
- May 2008
- abril 2008
- marzo 2008
- febrero 2008
- enero 2008
- diciembre 2007
- noviembre 2007
- octubre 2007
Categorías
Archivo mensual: febrero 2009
Suma de 2 números: por valor, por referencia, y por valor y referencia
Amaia Ganuza #include<stdio.h>#include<stdlib.h> float sumar1(float, float);void sumar2 (float*, float*,float*);float sumar3(float*, float); int main(){ float z1,z2,z3, x, y; printf("Dame x,y:"); scanf("%f %f",&x,&y); z1 = sumar1(x,y); printf ("La suma vale: %f n", z1); sumar2 (&x,&y,&z2); printf("La suma es … Seguir leyendo
Publicado en programacion
1 Comentario
Suma y producto de los N primeros números naturales
Beatriz Pina #include <stdio.h> #include <stdlib.h> int suma (int); int producto (int); int main() { int num, s, p; printf(«Dame un numero:»); scanf(«%d», &num); s=suma(num); printf(«La suma vale: %d \n»,s); p=producto(num); printf(«El producto vale: %d \n»,p); … Seguir leyendo
Publicado en Informática e Internet
1 Comentario
Media de 3 números por referencia
Martínez Navarro, Erik #include<stdio.h>#include<stdlib.h> void media(int*, int*, int*, float*); int main(){ int a, b, c; float y; printf("Introduce el primer numeron"); scanf("%d", &a); printf("Introduce el segundo numeron"); scanf("%d", &b); printf("Introduce el tercer numeron"); scanf("%d", &c); media (&a, … Seguir leyendo
Publicado en programacion
1 Comentario
Función: media de 3 números
Martínez Navarro, Erik #include<stdio.h>#include<stdlib.h> float media(int, int, int); int main(){ int a, b, c; float y; printf("Introduce el primer numeron"); scanf("%d", &a); printf("Introduce el segundo numeron"); scanf("%d", &b); printf("Introduce el tercer numeron"); scanf("%d", &c); … Seguir leyendo
Publicado en programacion
1 Comentario
Función: Área de un círculo a partir de su radio
Beatriz Pina #include <stdio.h>#include <stdlib.h> float areacirculo (float z); int main(){ float x, y; printf("Dame el radio del circulo:"); scanf("%f", &x); y=areacirculo(x); printf("El area del circulo es %f n",y); system("PAUSE"); return 0;} float areacirculo (float … Seguir leyendo
Publicado en programacion
1 Comentario
Función: Cuadrado de un número
Beatriz Pina #include <stdio.h>#include <stdlib.h> float cuadrado (float); int main(){ float x, y; printf("Dame un numero:"); scanf("%f", &x); y=cuadrado(x); printf("El cuadrado de %f es %f n", x,y); system("PAUSE"); return 0;} float cuadrado(float z) { float … Seguir leyendo
Publicado en programacion
1 Comentario
Función que escribe las cifras de un número una por una
Amaia Ganuza #include <stdio.h> #include <stdlib.h> void cifras ( int num ); int main(){ cifras (1999); system("PAUSE"); return 0;} void cifras (int num) { while (num != 0) { printf("cifra: %d n", num %10); num = num / 10; } … Seguir leyendo
Publicado en programacion
1 Comentario
Notas del Examen de Febrero en el tablón
Ya tenéis colocadas en el Tablón del Área las notas del Examen de Febreroasí como el total de Bonus acumulados por los ejercicios realizados eneste primer cuatrimestre. os deseo ánimos y corajepara que logréis un productivo 2º cuatrimestre. un saludo,Ricardo … Seguir leyendo
Publicado en programacion
Deja un comentario
Cuenta: positivos, negativos, suma, máximo y mínimo
Erik Martínez Navarro #include<stdio.h>#include<stdlib.h> main (){ int numero, suma, positivos, negativos, mayor, menor; printf("Introduzca tantos numeros como quiera.n"); printf("Para finalizar pulsa 0n"); suma=0; positivos=0; negativos=0; mayor=0; menor=0; do { scanf("%d", &numero); if(numero>0) positivos=positivos+1; if(numero<0) negativos=negativos+1; if(numero>mayor) mayor=numero; if(numero<menor) menor=numero; suma=suma+numero; }while(numero!=0); printf("Positivos:%dn", positivos); printf("Negativos:%dn", negativos); printf("La suma vale %dn", suma); printf("El numero mayor es %dn", mayor); printf("El numero … Seguir leyendo
Publicado en programacion
1 Comentario
Número N de datos con reserva dinámica de memoria
Erik Martínez Navarro #include <stdio.h>#include <stdlib.h> int main(void){ int *buffer = NULL; char *bufferChar = NULL; float *bufferFloat = NULL; char tipo; int num,i; printf("Tipo a introducir. (C)har, (I)nt o (F)loat: "); scanf ("%c", &tipo); printf ("Número de … Seguir leyendo
Publicado en programacion
1 Comentario