Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TEST;
- import java.util.Scanner;
- public class TEST1 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- System.out.println("enter a number:");
- Scanner num=new Scanner(System.in);
- int i,n;
- n=num.nextInt();
- for(i=1;i<n;i++) {
- if(n%i==0) {
- System.out.println(+ i);
- }
- }
- int num=5 ;
- int j=10;
- for(int r=1;r<=5;r++) {
- for(int c=1; c<=10;c++ ) {
- int sum=r*c; System.out.printf("%d x %d =%d \n ",r,c,sum);
- // }
- //
- // System.out.printf("\n");
- //
- // }
- // System.out.println("enter the number:");
- // Scanner num=new Scanner(System.in);
- // int n,i,c=0;
- // n=num.nextInt();
- // for(i=1;i<=n;i++) {
- // //for(j=1;j<=i;j++) {
- // if(n%i==0)
- // c++;
- //
- // }
- // if(c==2)
- // System.out.println("prime");
- // else
- // System.out.println("No");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement