Zusammenfassung der Ressource
Frage 1
Frage
[blank_start]i=1;[blank_end]
while (i<10)
{
System.out.println('hola');
i=i+1;
}
Frage 2
Frage
a=1;
do
[blank_start]{[blank_end]
System.out.pritln(a + "*" +i+ "=" + a*i);
[blank_start]i=i+1;[blank_end]
}
while ([blank_start]i<=10[blank_end]);
Antworten
-
{
-
i=i+1;
-
+i+
-
pritln
-
i<=10
-
i==10
Frage 3
Frage
Scanner x=[blank_start]new[blank_end] Scanner (System.[blank_start]in[blank_end]);
Antworten
-
in
-
int
-
ini
-
float
-
new
-
neu
-
nev
Frage 4
Frage
int i,vcs;
String nm;
Scanner x=new Scanner (System.in);
System.out.println ("dame un nombre");
nm=x.nextLine();
System.out.println("cuantas veces quieres que se repita");
vcs=x.nextInt();
i=1;
[blank_start]do[blank_end] {
System.out.println(nm);
i=i+1;
}
while (i<=vcs);
Frage 5
Frage
int i,n;
Scanner x=new Scanner (System.in);
i=1;
System.out.println("Dame el valor de N");
n=x.next[blank_start]Int[blank_end]();
[blank_start]do[blank_end] { System.out.println(i);
i=i+1; }
[blank_start]while[blank_end] (i<=n);
Frage 6
Frage
int i;
i=1;
do {
if (i [blank_start]%[blank_end] 2==0)
{
System.out.println([blank_start]i[blank_end]);
}
[blank_start]i=i+1[blank_end];
}
while (i<=10);
}
Frage 7
Frage
int us,cla,i,a;
Scanner w=new [blank_start]Scanner[blank_end](System.in);
System.out.println("cual es su usuario");
us=w.next[blank_start]Int[blank_end]();
System.out.println("cual es su clave");
cla=[blank_start]w[blank_end].nextInt();
if (us == 1[blank_start]&&[blank_end] cla == 123)
{
System.out.println("Acceso autorizado");
}
[blank_start]else[blank_end]
{
System.out.println("acceso denegado");
}
Frage 8
Frage
[blank_start]switch[blank_end] (op)
{
case 1:
System.[blank_start]out[blank_end].println("UNO");
break;
case [blank_start]2[blank_end]:
System.out.println("UNO")[blank_start];[blank_end]
break;
default:
System.out.println("no existe opción");
[blank_start]break[blank_end];
[blank_start]}[blank_end]
Antworten
-
switch
-
out
-
Swith
-
2
-
break
-
;
-
}
Frage 9
Frage
int A;
A= 1;
[blank_start]while[blank_end] (A<=10)
{
System.out.[blank_start]println[blank_end]("Jose")[blank_start];[blank_end]
[blank_start]A= A+1[blank_end];
}
Antworten
-
while
-
for
-
if
-
a++
-
primnt
-
:
-
}
-
println
-
printm
Frage 10
Frage
int i=1;
while ([blank_start]i<=10[blank_end])
{
if (i % 2 [blank_start]==[blank_end] 0){
System.out.println(i);
}
[blank_start]i=i+1[blank_end];
}
Antworten
-
i<=10
-
x=10
-
i>=10
-
=
-
<=
-
x=x+x