Public class
This presentation is the property of its rightful owner.
Sponsored Links
1 / 15

public class Output0501 { public static void main (String args []) { PowerPoint PPT Presentation


  • 59 Views
  • Uploaded on
  • Presentation posted in: General

public class Output0501 { public static void main (String args []) { for ( int x = 1; x < 8; x++) System.out.println ("x = " + x); } }. public class Output0502 { public static void main (String args []) { for ( int x = 1; x <= 8; x++) System.out.println ("x = " + x);

Download Presentation

public class Output0501 { public static void main (String args []) {

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Public class output0501 public static void main string args

public class Output0501

{

public static void main (String args[])

{

for (int x = 1; x < 8; x++)

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0502

{

public static void main (String args[])

{

for (int x = 1; x <= 8; x++)

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0503

{

public static void main (String args[])

{

for (int x = 0; x <= 8; x+=2)

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0504

{

public static void main (String args[])

{

int x = 0;

int y = 0;

for (y = 1; y <= 25; y++)

{

y+=5;

System.out.println(y);

}

}

}


Public class output0501 public static void main string args

public class Output0505

{

public static void main (String args[])

{

intx = 0;

inty = 0;

for (x = 1; x > 1; x--)

y++;

System.out.println("y = " + y);

}

}


Public class output0501 public static void main string args

public class Output0506

{

public static void main (String args[])

{

int x = 0;

int y = 0;

while (x < 5)

{

y++;

x = y;

}

System.out.println("y = " + y);

}

}


Public class output0501 public static void main string args

public class Output0507

{

public static void main (String args[])

{

intx = 0;

inty = 0;

while (x < 10)

{

y = x + 2;

x = y + 3;

}

System.out.println("y = " + y);

}

}


Public class output0501 public static void main string args

public class Output0508

{

public static void main (String args[])

{

intx = 0;

inty = 0;

while (x < 10)

{

y = x * 2;

x++;

}

System.out.println("x = " + x);

System.out.println("y = " + y);

}

}


Public class output0501 public static void main string args

public class Output0509

{

public static void main (String args[])

{

intx = 2;

while (x < 10)

{

if (x % 2 == 0)

x+=2;

else

x++;

}

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0510

{

public static void main (String args[])

{

int x = 2;

do

{

if (x % 2 == 0)

x+=2;

else

x++;

}

while (x < 10);

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0511

{

public static void main (String args[])

{

intx = 10;

inty = 20;

do

{

x = y + 2;

y = x - 2;

}

while (x < y);

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0512

{

public static void main (String args[])

{

int x = 10;

int y = 1;

do

{

if (x % 2 == 0)

x += 5;

else

y += 2;

}

while (y < x);

System.out.println("x = " + x);

}

}


Public class output0501 public static void main string args

public class Output0513

{

public static void main (String args[])

{

int x = 1;

int y = 3;

int z = 5;

while (z > x + y)

{

x = y + z;

y = x + z;

z = x - y;

}

System.out.println("x = " + x);

System.out.println("y = " + y);

System.out.println("z = " + z);

}

}


Public class output0501 public static void main string args

public class Output0514

{

public static void main (String args[])

{

int x = 1;

int y = 2;

int z = 3;

for (int k = 1; k <= 10; k++)

{

x = y + z;

y = x + z;

z = x - y;

}

System.out.println("x = " + x);

System.out.println("y = " + y);

System.out.println("z = " + z);

}

}


Public class output0501 public static void main string args

public class Output0515

{

public static void main (String args[])

{

int x = 168; int y = 90; int z = 0;

do

{

z = x % y;

if (z == 0)

System.out.println("y = " + y);

else

{

x = y;

y = z;

}

}

while (z != 0);

}

}


  • Login