import java.io.*;
import javax.swing.*;
class dowhile2{
public static void main(String [] args)throws Exception{
{
BufferedReader c= new BufferedReader(new InputStreamReader(System.in));
do{
System.out.println("age?");
String age=c.readLine();
int bb=Integer.parseInt(age);
System.out.println("age!");
String ageint=c.readLine();
int cc=Integer.parseInt(ageint);
int aa=bb+cc;
int dd=aa+cc;
int ee=dd+aa;
int ff=ee+dd;
int gg=ff+ee;
int hh=gg+ff;
int ii=hh+gg;
int jj=ii+hh;
int kk=jj+ii;
int ll=kk+jj;
int mm=ll+kk;
int nn=mm+ll;
int oo=nn+mm;
int pp=oo+nn;
int qq=pp+oo;
try{
System.out.println("age is: "+aa);
if (aa%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+dd);
if (dd%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+ee);
if (ee%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+ff);
if (ff%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+gg);
if (gg%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+hh);
if (hh%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+ii);
if (ii%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+jj);
if (jj%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+kk);
if (kk%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+ll);
if (ll%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+mm);
if (mm%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+nn);
if (nn%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+oo);
if (oo%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+pp);
if (pp%26gt;=1000){
System.exit(0);
}
System.out.println("age is: "+qq);
if (qq%26gt;=1000){
System.exit(0);
}
System.exit(0);break;
}catch(Exception d){
JOptionPane.showMessageDialog(null,"P... OK to blow up yor P.C: ");
System.exit(0);
System.out.println("sorry but only number's are accepted");
System.out.println("The Letter you type is not in Service");
System.out.println("Pls do not try again Later");
}
}while(0%26lt;=100);
}
}
}
I want to covert this code in do while loop? Pls Help me dis is important!?
It looks like it's already in a do-while loop. Or do you mean you want to change the code inside the do-while loop.. how do you want to change it? What's wrong with it?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment