Problemas de Java en Netbeans-Arreglos-uni-parcial

Share Embed Donate


Short Description

problemas de java resueltos en netbeanas con metodos sencillos de aprender...

Description

1 CeGo.net.....Stone_c35....FIEE-UNI

PROBLEMAS DE JAVA EN NETBEANS-ARREGLOS Y INSTRUCCIONES DE CONTROL.

Trusted by over 1 million members

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

Trusted by over 1 million members

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

Trusted by over 1 million members

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

2 CeGo.net.....Stone_c35....FIEE-UNI

PROBLEMA1: package parcialp1; import java.util.Scanne j ava.util.Scanner; r; public class P1 { float []lectura(){ Scanner entrada=new Scanner(System.in); float dato[]=new float[6]; System.out.println("Ingrese System.out.println("Ingrese coeficientes"); for(int i=0;ie){ x=x-(funcioncubica(a,b,c,d,x))/(funcionderivada(a,b,c,x)); f=funcioncubica(a,b,c,d,x); i++; System.out.println("metodo System.out.println("metodo N° "+i+" la aproximacion es "+x); }} public static void main(String[] args) { P1 objeto=new P1(); float dato[]=new float[6]; dato=objeto.lectura(); objeto.efectuar(dato[0],dato[1],dato[2],dato[3],dato[4],dato[5]); }} run: Ingrese coeficientes 1 -1 -1 -2 Ingrese una aproximacion 8 Ingrese epsilon 1 metodo N° 1 la aproximacion es 5.497143 metodo N° 2 la aproximacion es 3.8648295

Trusted by over 1 million members

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

Trusted by over 1 million members

Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.

4 CeGo.net.....Stone_c35....FIEE-UNI BUILD SUCCESSFUL (total time: 9 seconds)

PROBLEMA 2: package parcialp2; import java.util.Scanne j ava.util.Scanner; r; public class P2 { int[] lecturaa(){ Scanner entrada=new Scanner(System.in); System.out.println("N° System.out.println("N° elementos de la m atriz A: "); int na=entrada.nextInt(); na=entrada.nextInt(); int A[]=new int[na]; System.out.println("Ingrese System.out.println("Ingrese elementos"); for(int i=0;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF