FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

files added · TORRYNN/Java_Learning@1421b7e · GitHub

Commit 1421b7e

Browse files
committed
files added
1 parent d68c49b commit 1421b7e

8 files changed

Lines changed: 85 additions & 0 deletions

File tree

1.02 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
//In a program , input 3 numbers :A ,B and C. You have to out put the average of these 3 numbers.
4+
5+
import java.util.Scanner;
6+
7+
public class Question1 {
8+
public static void main(String[] args) {
9+
Scanner sc = new Scanner(System.in);
10+
int a = sc.nextInt();
11+
int b = sc.nextInt();
12+
int c = sc.nextInt();
13+
int avg = (a + b + c) / 3;
14+
System.out.println("Average of 3 num " + avg);
15+
sc.close();
16+
17+
}
18+
}
1006 Bytes
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import java.util.Scanner;
3+
4+
public class Question2{
5+
public static void main(String[] args){
6+
Scanner sc= new Scanner(System.in);
7+
int side=sc.nextInt();
8+
System.out.println("Area of Square "+(side*side));
9+
sc.close();
10+
}
11+
}
1.21 KB
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.util.Scanner;
2+
3+
public class Question3 {
4+
public static void main(String args[]){
5+
Scanner sc= new Scanner(System.in);
6+
float pencil=sc.nextFloat();
7+
float pen=sc.nextFloat();
8+
Float eraser=sc.nextFloat();
9+
float sum=pencil+pen+eraser;
10+
float Price= sum+ (sum*18)/100;
11+
12+
System.out.println("Final Price excluding 18% GST "+ sum);
13+
System.out.println("Final Price including 18% GST "+ Price);
14+
15+
sc.close();
16+
17+
}
18+
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
public class Question4 {
2+
public static void main(String[] args){
3+
byte b=4;
4+
char c='a';
5+
short s=512;
6+
int i=1000;
7+
float f=3.14f;
8+
double d=99.9954;
9+
10+
double result = (f*b)+(i%c)-(d*s);
11+
}
12+
13+
}
14+
15+
16+

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 TORRYNN
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL