small fixes
This commit is contained in:
		| @@ -16,6 +16,7 @@ public class fibonacci { | |||||||
|             b = c; |             b = c; | ||||||
|             ++count; |             ++count; | ||||||
|             } |             } | ||||||
|  |         System.out.println("Closest number is: "+a); | ||||||
|         System.out.println("Index is : "+count); |         System.out.println("Index is : "+count); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -11,7 +11,7 @@ public class leapYear { | |||||||
|         } else if (year%4 == 0 || year%100 == 0 && year%400 == 0) { |         } else if (year%4 == 0 || year%100 == 0 && year%400 == 0) { | ||||||
|             System.out.println("The year "+year+" is a leap year!"); |             System.out.println("The year "+year+" is a leap year!"); | ||||||
|         } else { |         } else { | ||||||
|             System.out.println("The year: "+year+" isn't leap year"); |             System.out.println("The year: "+year+" isn't a leap year!"); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -6,8 +6,11 @@ public class number { | |||||||
|  |  | ||||||
|         System.out.println("Enter your phone number in 10 DIGIT!"); |         System.out.println("Enter your phone number in 10 DIGIT!"); | ||||||
|         String phone = scan.next(); |         String phone = scan.next(); | ||||||
|         System.out.println("Full : ("+phone.substring(0,3)+")"+phone.substring(3,6)+"-"+phone.substring(6,10)); |         System.out.println("Full : ("+phone.substring(0,3)+") "+ | ||||||
|         System.out.println("Local : "+phone.substring(3,6)+"-"+phone.substring(6,10)); |         phone.substring(3,6)+"-"+phone.substring(6,10)); | ||||||
|         System.out.println("Campus : "+phone.substring(5,6)+"-"+phone.substring(6,10)); |         System.out.println("Local : "+phone.substring(3,6)+"-"+ | ||||||
|  |         phone.substring(6,10)); | ||||||
|  |         System.out.println("Campus : "+phone.substring(5,6)+"-"+ | ||||||
|  |         phone.substring(6,10)); | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user