Java Ders Notları 3 Mart 2015, 12:37

Java Script – For İ Döngüsü ve Diziler Dersi

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ders3;
import java.util.Scanner;
/**
*
* @author Administrator
*/
public class Ders3 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int [] A = new int[10];
int B[] = {1,5,36,6,8,54,85,63};
for(int i=0; i<10; i++)
{
A[i]=i*i;
System.out.print(A[i] + ” “);
}
System.out.println();
for(int i = 0; i < B.length; i++)
{
System.out.print(B[i] + ” “);
}
}
}
—————————————————————————————————————————————–
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ders3;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
/**
*
* @author Administrator
*/
public class ders4 {
public static void main(String[] args) {
String output = “Indeks\tDeger\n”;
int [] s=new int[5];
for (int i=0; i<s.length; i++)
{
s[i] = Integer.parseInt(JOptionPane.showInputDialog(i +”. sayi”));
output += i + “\t” + s[ i ] + “\n”;
}
JTextArea outputArea = new JTextArea();
outputArea.setText( output );
JOptionPane.showMessageDialog( null, outputArea, “Tüm sayı dizi ile değeger arası”,
JOptionPane.INFORMATION_MESSAGE);
}
}
VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Java Script - For İ Döngüsü ve Diziler Dersi, 10.0 out of 10 based on 1 rating

Yazar Bilgileri

admin sedat.hackerr@gmail.com
Yazar, henüz hakkında herhangi bir bilgi paylaşımında bulunmamış.

Benzer İçerikler

Yorum Yap

*