Tecnología y Matemáticas
- www.escuelajosedeescandon.edu.mx
lunes, 1 de julio de 2013
jueves, 28 de febrero de 2013
dev c++ ejemplos
//tabla de multilplicaciones
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main()
{
int n=0;
int i=0;
int r=0;
{
cout <<"tabla de multiplicar para x numeron";
cout << "introduce un numero nn";
cin >>n;
for (i=1;i<11;i++)
{
r=i*n;
cout <<n <<"*" <<i <<"=" << r<<endl;
}
getch();
}
}
//ecuacion formula general de segundo grado
#include "conio.h"
#include "stdio.h"
#include "math.h"
#include "iostream.h"
main()
{
int a,b,c;
float x1,x2,x3;
cout<< "a=";
cin>>a;
cout<< "b=";
cin>>b;
cout<< "c=";
cin>>c;
x3=sqrt(b*b)-4*a*c;
x1=(-b-x3)- 4*a*c/(2*a);
x2=(-b+x3)- 4*a*c/(2*a);
printf("el valor de x1 es %.2f ",x1);
printf("\nel valor de x2 es %.2f ",x2);
if(x3<0)
printf("\nla ecuacion es imaginaria");
else
printf("\nla ecuacion es real");
if(x3==0)
printf("\nla ecuacion es compleja");
getch();
}
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main()
{
int n=0;
int i=0;
int r=0;
{
cout <<"tabla de multiplicar para x numeron";
cout << "introduce un numero nn";
cin >>n;
for (i=1;i<11;i++)
{
r=i*n;
cout <<n <<"*" <<i <<"=" << r<<endl;
}
getch();
}
}
//ecuacion formula general de segundo grado
#include "conio.h"
#include "stdio.h"
#include "math.h"
#include "iostream.h"
main()
{
int a,b,c;
float x1,x2,x3;
cout<< "a=";
cin>>a;
cout<< "b=";
cin>>b;
cout<< "c=";
cin>>c;
x3=sqrt(b*b)-4*a*c;
x1=(-b-x3)- 4*a*c/(2*a);
x2=(-b+x3)- 4*a*c/(2*a);
printf("el valor de x1 es %.2f ",x1);
printf("\nel valor de x2 es %.2f ",x2);
if(x3<0)
printf("\nla ecuacion es imaginaria");
else
printf("\nla ecuacion es real");
if(x3==0)
printf("\nla ecuacion es compleja");
getch();
}
jueves, 1 de noviembre de 2012
jueves, 31 de mayo de 2012
lunes, 26 de marzo de 2012
martes, 14 de febrero de 2012
Taller de Robótica y Programación
Red de Robótica
accesorios
Portal Educativo
http://translate.google.com/translate?prev=hp&hl=ja&u=http%3A//www.isogawastudio.co.jp/legostudio/index.html&sl=ja&tl=en
accesorios
Portal Educativo
http://translate.google.com/translate?prev=hp&hl=ja&u=http%3A//www.isogawastudio.co.jp/legostudio/index.html&sl=ja&tl=en
jueves, 9 de febrero de 2012
Resultado Examen
****6A Humanidades
xa=float(input("dar el valor de xa="))
xb=float(input("dar el valor de xb="))
ep=float(input("dar el valor de ep="))
xm=(xa+xb)/2
epp=abs((xb-xm)/2)
while ep<epp:
xm=(xa+xb)/2
fxa=(xa*xa*xa)+(2*xa*xa)-(10*xa)-20
fxb=(xb*xb*xb)+(2*xb*xb)-(10*xb)-20
fxm=(xm*xm*xm)+(2*xm*xm)-(10*xm)-20
epp=abs((xb-xm)/2)
print (round(xa,8)," ",round(xm,8)," ",round(xb,8)," ",round(fxa,8)," ",round(fxm,8)," ",round(fxb,8)," ",round(epp,8))
if (fxm*fxb)>0:
xb=xm
else:
xa=xm
dar el valor de xa=2.7994168
dar el valor de xb=3.4992710
dar el valor de ep=.001
2.7994168 3.1493439 3.499271 -10.38241317 -0.42035639 12.34529989 0.17496355
3.1493439 3.32430745 3.499271 -0.42035639 5.59595373 12.34529989 0.08748177
3.1493439 3.23682567 3.32430745 -0.42035639 2.49817768 5.59595373 0.04374089
3.1493439 3.19308479 3.23682567 -0.42035639 1.01675646 2.49817768 0.02187044
3.1493439 3.17121434 3.19308479 -0.42035639 0.29269287 1.01675646 0.01093522
3.1493439 3.16027912 3.17121434 -0.42035639 -0.06520463 0.29269287 0.00546761
3.16027912 3.16574673 3.17121434 -0.06520463 0.11340042 0.29269287 0.00273381
3.16027912 3.16301293 3.16574673 -0.06520463 0.02401203 0.11340042 0.0013669
3.16027912 3.16164602 3.16301293 -0.06520463 -0.02061776 0.02401203 0.00068345
xa=float(input("dar el valor de xa="))
xb=float(input("dar el valor de xb="))
ep=float(input("dar el valor de ep="))
xm=(xa+xb)/2
epp=abs((xb-xm)/2)
while ep<epp:
xm=(xa+xb)/2
fxa=(xa*xa*xa)+(2*xa*xa)-(10*xa)-20
fxb=(xb*xb*xb)+(2*xb*xb)-(10*xb)-20
fxm=(xm*xm*xm)+(2*xm*xm)-(10*xm)-20
epp=abs((xb-xm)/2)
print (round(xa,8)," ",round(xm,8)," ",round(xb,8)," ",round(fxa,8)," ",round(fxm,8)," ",round(fxb,8)," ",round(epp,8))
if (fxm*fxb)>0:
xb=xm
else:
xa=xm
dar el valor de xa=2.7994168
dar el valor de xb=3.4992710
dar el valor de ep=.001
2.7994168 3.1493439 3.499271 -10.38241317 -0.42035639 12.34529989 0.17496355
3.1493439 3.32430745 3.499271 -0.42035639 5.59595373 12.34529989 0.08748177
3.1493439 3.23682567 3.32430745 -0.42035639 2.49817768 5.59595373 0.04374089
3.1493439 3.19308479 3.23682567 -0.42035639 1.01675646 2.49817768 0.02187044
3.1493439 3.17121434 3.19308479 -0.42035639 0.29269287 1.01675646 0.01093522
3.1493439 3.16027912 3.17121434 -0.42035639 -0.06520463 0.29269287 0.00546761
3.16027912 3.16574673 3.17121434 -0.06520463 0.11340042 0.29269287 0.00273381
3.16027912 3.16301293 3.16574673 -0.06520463 0.02401203 0.11340042 0.0013669
3.16027912 3.16164602 3.16301293 -0.06520463 -0.02061776 0.02401203 0.00068345
Suscribirse a:
Entradas (Atom)