This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| /** | |
| * Created by Dheshan on 9/8/2015. | |
| * Calculate the price for posting a courier if the courier company demands Rs.50 for posting Rs.1 for every gram above | |
| * 200g and Rs.2 for anything above 500g. | |
| **/ | |
| public class CourierPrice { | |
| public static void main(String Args[]){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| public class Calculator { | |
| public static void main(String Args[]){ | |
| Scanner in=new Scanner(System.in); | |
| double n1,n2,n3; | |
| System.out.println("Choose the Function to Perform"); | |
| String exec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| /** | |
| * Created by Dheshan on 9/9/2015. | |
| * Convert 'a' to 'an' in a String if the word starts with an vowel | |
| */ | |
| public class AtoAn { | |
| public static void main(String Args[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| /** | |
| * Created by dheshan on 9/24/2015. | |
| */ | |
| public class PrimeCheck { | |
| public static void main(String Args[]){ | |
| int number,i=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| /** | |
| * Created by dheshan on 9/25/2015. | |
| */ | |
| public class TEST { | |
| public static int Prime(int number){ | |
| int i=0,z=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.Scanner; | |
| /** | |
| * Created by dheshan on 9/25/2015. | |
| */ | |
| public class TEST { | |
| public static int Prime(int number) { | |
| int i = 0, z = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int Prime(long number) { | |
| long i = 0; | |
| int z=0; | |
| for (long n = 2; n < number; n++) { | |
| if (number % n == 0) { | |
| //System.out.println("The number is not a Prime Number"); | |
| i = 1; | |
| z = 0; | |
| break; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package starting.java.tutorials; | |
| import java.util.*; | |
| import java.io.*; | |
| /** | |
| * Created by Dheshan M (@D-codex) on 10/8/2015. | |
| */ | |
| public class MarksStorage { | |
| public static void main(String Args[])throws IOException{ | |
| String phy,chem,math,eng,cs,Exam,totals; |
OlderNewer