1
1
2
2
/* LOOPS */
3
3
4
-
5
- public class JavaLoops {
4
+ import java . util .*;
5
+ public class JavaLoops {
6
6
public static void main (String args []){
7
7
int counter = 0 ;
8
8
while (counter < 3 ){
9
9
System .out .println ("Navnitya is a Software Developer" );
10
10
counter ++;
11
11
}
12
12
13
- }
14
- }*/
13
+ // }
14
+ // }*/
15
15
16
16
/* Print no 1 to 10 */
17
17
18
- public class JavaLoops {
19
- public static void main (String args []){
20
- int counter = 1 ;
21
- while (counter <=10000 ){
22
- System .out .print (counter +" " );
23
- counter ++;
18
+ // public class JavaLoops{
19
+ // public static void main(String args[]){
20
+ int counter1 = 1 ;
21
+ while (counter1 <=10000 ){
22
+ System .out .print (counter1 +" " );
23
+ counter1 ++;
24
24
}
25
- }
26
- }
25
+ // }
26
+ // }
27
27
28
- import java . util .*;
29
- public class JavaLoops {
30
- public static void main (String args []){
28
+
29
+ // public class JavaLoops{
30
+ // public static void main(String args[]){
31
31
System .out .print ("Enter tha range of nos : " );
32
32
Scanner sc = new Scanner (System .in );
33
33
int range = sc .nextInt ();
@@ -329,27 +329,27 @@ public static void main(String args[]){
329
329
DEF
330
330
GHIJ
331
331
*/
332
- public class JavaLoops {
333
- public static void main (String args []){
334
- int n = 4 ;
332
+ // public class JavaLoops{
333
+ // public static void main(String args[]){
334
+ int nq = 4 ;
335
335
char ch = 'A' ;
336
- for (int i = 1 ; i <=n ; i ++){
336
+ for (int i = 1 ; i <=nq ; i ++){
337
337
for (int j = 1 ; j <=i ; j ++){
338
338
System .out .print (ch );
339
339
ch ++;
340
340
}
341
341
System .out .println ();
342
342
}
343
- }
344
- }
343
+ // }
344
+ // }
345
345
/*
346
346
1
347
347
12
348
348
123
349
349
1234
350
350
*/
351
- public class JavaLoops {
352
- public static void main (String args []){
351
+ // public class JavaLoops{
352
+ // public static void main(String args[]){
353
353
int n = 10 ;
354
354
// int num = 1;
355
355
for (int i =1 ; i <=n ; i ++){
@@ -362,16 +362,16 @@ public static void main(String args[]){
362
362
}
363
363
System .out .println ();
364
364
}
365
- }
366
- }
365
+ // }
366
+ // }
367
367
/*
368
368
****
369
369
* *
370
370
* *
371
371
****
372
372
*/
373
- public class JavaLoops {
374
- public static void main (String args []){
373
+ // public class JavaLoops{
374
+ // public static void main(String args[]){
375
375
for (int line =1 ; line <=4 ; line ++){
376
376
if (line ==2 && line ==3 ){
377
377
System .out .print ("* *" );
0 commit comments