From ed022fefce6009b872b747fd94cb61baae00efba Mon Sep 17 00:00:00 2001 From: eshabawaskar <68116857+eshabawaskar@users.noreply.github.com> Date: Fri, 2 Oct 2020 19:45:49 +0530 Subject: [PATCH 1/3] Update Temperature conversion (Celcius to farenheit) --- Temperature conversion (Celcius to farenheit) | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Temperature conversion (Celcius to farenheit) b/Temperature conversion (Celcius to farenheit) index b847adf..83d17f0 100644 --- a/Temperature conversion (Celcius to farenheit) +++ b/Temperature conversion (Celcius to farenheit) @@ -6,7 +6,7 @@ class Cels{ { Scanner userin = new Scanner(System.in); - System.out.println("Enter Temperature in Celsius: "); + System.out.println("Enter Temperature in Celsius: "); //enter temp float input =userin.nextFloat(); From ea2d684ef419dc2b2bb96094a9f9af38eea06bb3 Mon Sep 17 00:00:00 2001 From: eshabawaskar <68116857+eshabawaskar@users.noreply.github.com> Date: Fri, 2 Oct 2020 19:46:55 +0530 Subject: [PATCH 2/3] Update calculator.java --- calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.java b/calculator.java index d68918d..6fc048a 100644 --- a/calculator.java +++ b/calculator.java @@ -8,7 +8,7 @@ public static void main(String args[]){ int input = s1.nextInt(); System.out.println("\nEnter the first number: "); int n1=s1.nextInt(); - System.out.println("\nEnter the second number: "); + System.out.println("\nEnter the second number: "); //enter 2nd number int n2=s1.nextInt(); switch(input) { From 030189fd09b044caf7c17941a14d42df9dd79959 Mon Sep 17 00:00:00 2001 From: Mayank Raghuwanshi <55357227+MayankRaghuwanshi01@users.noreply.github.com> Date: Sat, 3 Oct 2020 11:24:00 +0530 Subject: [PATCH 3/3] Add files via upload --- Employee.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ Grade.java | 25 +++++++++++++++++++++++++ pattern.java | 28 ++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 Employee.java create mode 100644 Grade.java create mode 100644 pattern.java diff --git a/Employee.java b/Employee.java new file mode 100644 index 0000000..b72a07f --- /dev/null +++ b/Employee.java @@ -0,0 +1,46 @@ +import java.util.*; +class Employee +{ + int age; + long days; + long salary; + long overtime; + long phone; + String name; + long gross; + double rate; + void accept() + { + Scanner Scan=new Scanner(System.in); + System.out.print("Enter your name: "); + name=Scan.next(); + System.out.print("Enter your Phone No.: "); + phone=Scan.nextLong(); + System.out.print("Enter your age: "); + age=Scan.nextInt(); + System.out.print("Enter your Basic Salary: "); + salary=Scan.nextLong(); + System.out.print("Total present days: "); + days=Scan.nextInt(); + System.out.print("Enter Overtime(in hrs): "); + overtime=Scan.nextInt(); + System.out.print("Enter rate: "); + rate=Scan.nextDouble(); + gross = (long) ((salary*days/30)+(overtime*rate)); + days= days + overtime/24; + } + void display() + { + System.out.println("\nName: "+name); + System.out.println("Phone No.: "+phone); + System.out.println("Age: "+age); + System.out.println("Present days: "+days); + System.out.println("Gross Salary: "+gross); + } + public static void main(String args[]) + { + Employee obj=new Employee(); + obj.accept(); + obj.display(); + } +} diff --git a/Grade.java b/Grade.java new file mode 100644 index 0000000..fb22f6b --- /dev/null +++ b/Grade.java @@ -0,0 +1,25 @@ +import java.util.*; +public class Grade +{ + public static void main(String args[]) + { + Scanner sc = new Scanner(System.in); + System.out.println("Enter your test score:"); + int ts=sc.nextInt(); + sc.nextLine(); + if(ts>90 && ts<=100) + System.out.println("A"); + else if(ts>80) + System.out.println("B"); + else if(ts>70) + System.out.println("C"); + else if(ts>60) + System.out.println("D"); + else if(ts>=0) + System.out.println("F"); + else + System.out.println("Enter a valid score(0-100)"); + sc.close(); + } + +} \ No newline at end of file diff --git a/pattern.java b/pattern.java new file mode 100644 index 0000000..6505e24 --- /dev/null +++ b/pattern.java @@ -0,0 +1,28 @@ +import java.util.*; + +public class pattern { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + int rows = input.nextInt(); + int k, l; + String string1=""; + String string2=""; + for (int i=0;i=65;l--) + { + string2=Character.toString(l); + System.out.print(string2+" "); + } + System.out.println(); + } + } +} \ No newline at end of file