FACULTAD DE INGENIERA
CALIFICACION DE LA TAREA:
OBSERVACIONES:
Problema 1
#include<stdio.h>
#include<conio.h>
main()
int i,x[10];
scanf("%d",&x[i]);
if(((x[i])%(2))==0)
printf(" %d \n",x[i]);
getch();
}
Problema 2
#include<stdio.h>
#include<conio.h>
main()
int i,x[10];
scanf("%d",&x[i]);
if(((x[i])%(2))==0)
printf(" %d \n",i);
getch();
}
Problema 3
#include<stdio.h>
#include<conio.h>
main()
int n,i;
float p,z,s;
scanf("%d",&n);
float x[n];
scanf("%f",&x[i]);
s=s+x[i];
p=s/n;
z=0;
if(x[i]>p)
z++;
}
getch();
}
Problema 4
#include<stdio.h>
#include<conio.h>
main()
int n,i,j;
scanf("%d",&n);
float x[n];
scanf("%f",&x[i]);
printf("*");
printf("\n");
getch();
}
Problema 5
#include<stdio.h>
#include<conio.h>
main()
float v;
int i,n;
scanf("%d",&n);
float a[n],b[n];
scanf("%f",&a[i]);
scanf("%f",&b[i]);
v=a[i]*b[i];
getch();
}
Problema 6
#include<stdio.h>
#include<conio.h>
main()
int i,j,n,m;
printf("renglones ");
scanf("%d",&n);
printf("columnas ");
scanf("%d",&m);
int a[n][m];
scanf("%d",&a[i][j]);
printf("\n");
printf("\n");
{
printf("%6d",a[i][j]);
printf("\n");
printf("\n");
printf("\n");
getch();
printf("\n");
printf("\n");
printf("\n");
if(i==j)
a[i][j]=0;
printf("%6d",a[i][j]);
printf("\n");
printf("\n");
printf("\n");
}
getch();
}
Problema 7
#include<stdio.h>
#include<conio.h>
main()
int n,m,i,j,s;
s=0;
scanf("%d",&n);
scanf("%d",&m);
int a[m][n];
scanf("%d",&a[i][j]);
if(i!=j)
{
s = s + a[i][j];
getch();
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("%6d",a[i][j]);
printf("\n");
printf("\n");
printf("\n");
getch();
printf("\n");
printf("\n");
getch();
}
Tarea
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
int n,i,;
float t,g,p,z,s,q,y;
scanf("%d",&n);
float x[n];
scanf("%f",&x[i]);
g=g+x[i];
t=g/n;
z=0;
q = 0;
p = pow((x[i] - t),(2));
z = z + p;
}
s = z/(n-1);
y = pow((s),(.5));
getch();