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);
Answer
do
int
While
for
Question 5
Question
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);
Answer
Int
do
while
Question 6
Question
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);
}
Answer
%
&
@
x
y
x+2
Question 7
Question
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");
}
Answer
Scanner
Question 8
Question
[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]