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 demo | |
import java.util.* | |
fun main(args: Array<String>) | |
{ | |
var sc = Scanner(System.`in`) | |
println("Enter your age") | |
var age = sc.nextInt() |
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 demo | |
fun main (args: Array<String>){ | |
val Bharddwaj = Human("Bharddwaj", 16, 6.00, 144.5) | |
Bharddwaj.getInfo() | |
} | |
open class Human (val name: String, var age: Int, var height: Double,var weight: Double){ |
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 Chapter2; | |
import java.util.Random; | |
import java.util.Scanner; | |
public class chap2set3 { | |
public static void main(String args[]){ | |
//Exercise 2.10 | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter a value for first side of the triangle "); | |
double A = sc.nextDouble(); |
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 Chapter2; | |
import java.util.Scanner; | |
import java.text.DecimalFormat; | |
//Bharddwaj | |
//Period 6/7 | |
public class chap2set2 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |
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 Chapter2; | |
import java.util.Scanner; | |
//Bharddwaj | |
//period 6/7 | |
public class chap2Set1 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
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
import java.util.Scanner; | |
public class areaOfcircle { | |
public static void circleArea(){ | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Enter the radius"); | |
double radius = sc.nextDouble(); | |
double Area = (double)(Math.PI*(Math.pow(radius,2))); | |
System.out.println("The area of the circle is " + Area); | |
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 Chapter2; | |
//Bharddwaj Vemulapalli | |
//Period 6/7 | |
public class chap2Longwords { | |
public static void main(String[] args) { | |
// String LW2 = new String(""); | |
String idk = "otorhinolaryngological "; | |
char letter1 = idk.charAt(0); | |
int numLtrs = idk.length(); |
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
import java.util.Scanner; | |
//Bharddwaj Vemulapalli | |
//Period 6/7 | |
//Java | |
public class gradeConversion { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
//Exercise 1 | |
System.out.println("Enter your grade"); |
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
import java.util.Scanner; | |
//Bharddwaj Vemulapalli | |
//Period 6/7 | |
//Java | |
public class leapYear { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int x = 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
import java.util.Scanner; | |
public class triangle { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
double s1 = 0; | |
double s2 = 0; | |
double s3 = 0; | |
String quote = "yes"; | |
while(quote.equals("yes")) { |
OlderNewer