Commit bca1f798 authored by 9831067's avatar 9831067

Add works of Season 1 of AP Lap!

parents
Pipeline #2173 failed with stages
File added
import java.util.Scanner;
public class Q1{
public static void main(String[] args) {
int x , y , max , min , counter = 0;
Scanner scanner = new Scanner(System.in) ;
x = scanner.nextInt() ;
y = scanner.nextInt() ;
if(x>y) {
max = x;
min = y;
}
else {
min = x;
max = y;
}
while(min != 0) {
int temp = min ;
min = max % min ;
if(min ==0 && temp != 1) {
System.out.println("not aval!!!!") ;
counter ++ ;
}
max = temp ;
}
if(counter == 0)
System.out.println("avval!!!!");
}
}
File added
public class Q2{
public static void main(String[] args) {
int i , j ;
for( i = 1 ;i< 11 ; i = i+1) {
for( j=1 ; j<11 ; j = j+1){
System.out.print(i + " * " + j + " = " + i*j + "\t") ;
}
System.out.println() ;
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment