lab9
This commit is contained in:
parent
d9b25652f4
commit
121f8ed3e1
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/lab7_CalebFontenot/target/
|
||||
/MP2_CalebFontenot/target/
|
||||
/lab8_CalebFontenot/target/
|
||||
/lab9_CalebFontenot/target/
|
||||
|
14
lab9_CalebFontenot/pom.xml
Normal file
14
lab9_CalebFontenot/pom.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.calebfontenot</groupId>
|
||||
<artifactId>lab9_CalebFontenot</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>18</maven.compiler.source>
|
||||
<maven.compiler.target>18</maven.compiler.target>
|
||||
<exec.mainClass>com.calebfontenot.lab9_calebfontenot.Lab9_CalebFontenot</exec.mainClass>
|
||||
</properties>
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||
*/
|
||||
|
||||
package com.calebfontenot.lab9_calebfontenot;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class Lab9_CalebFontenot {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.calebfontenot.lab9_calebfontenot;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ASDV2
|
||||
*/
|
||||
public class MinimumOf3 {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
Scanner scan = new Scanner(System.in);
|
||||
|
||||
System.out.println("Please neter 3 numbers to find the minimum of the 3:");
|
||||
int x = scan.nextInt();
|
||||
int y = scan.nextInt();
|
||||
int z = scan.nextInt();
|
||||
|
||||
/*
|
||||
if ( x < y )
|
||||
if ( x < z )
|
||||
System.out.println("minimum= " + x);
|
||||
else
|
||||
System.out.println("minimum= " + z);
|
||||
else if ( y < z )
|
||||
System.out.println("minimum= " + y);
|
||||
else
|
||||
System.out.println("minimum= " + z);
|
||||
|
||||
*/
|
||||
System.out.println(
|
||||
(x < y)
|
||||
? (x < z) ? "minimum= " + x
|
||||
: "minimum= " + z
|
||||
: (y < z) ? "minimum= " + y : "minimum= " + z
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user