Notes
Notes - notes.io |
import java.util.Scanner;
public class Ginp{
public static void main(String[] args){
Scanner inp = new Scanner(System.in);
String s = inp.nextLine();
System.out.println("Input = " + s);
int x = inp.nextInt();
System.out.println("Input = " + x);
float y = inp.nextFloat();
System.out.println("Input = " + y);
}
}
#max code
import java.util.Scanner;
public class Max{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int x1 = in.nextInt();
int x2 = in.nextInt();
if (x1 > x2){
System.out.println(x1 + " is max");
}
else {
System.out.println(x2 + " is max");
}
}
}
#average code
import java.util.Scanner;
public class Avg{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
float x1 = in.nextFloat();
float x2 = in.nextFloat();
float x3 = in.nextFloat();
float x4 = in.nextFloat();
float x5 = in.nextFloat();
float avg = (x1+x2+x3+x4+x5) / 5.0;
System.out.println("Average = " + avg);
}
}
#name Inp code
import java.util.Scanner;
public class Names{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
String s1 = in.nextLine();
String s2 = in.nextLine();
String s3 = in.nextLine();
String s4 = in.nextLine();
String s5 = in.nextLine();
System.out.println(s1+' '+s2+' '+s3+' '+s4+' '+s5);
}
}
#area
import java.util.Scanner;
public class Area{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
float l = in.nextFloat();
float b = in.nextFloat();
float area = l * b;
System.out.println("Area = "+ area);
}
}
#even or odd
import java.util.Scanner;
public class EvenOrOdd{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int num = in.nextInt();
if (num % 2 == 0){
System.out.println(num + " is even");
}
else{
System.out.println(num + " is odd");
}
}
}
#cel to fah
import java.util.Scanner;
public class EvenOrOdd{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
float cel = in.nextFloat();
float fah = (cel * (9/5)) + 32;
System.out.println(cel + " celsius = " + fah + " Fahenheit");
}
}
#leap or not
import java.util.Scanner;
public class LeapOrNot{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int year = in.nextInt();
if (( (year % 4 == 0) && (year % 100 != 0)) || ((year % 4 == 0) && (year % 100 == 0) && (year % 400 == 0))){
System.out.println(year + " is a leap year");
}
else{
System.out.println(year + " is not a leap year");
}
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
