LabClass
This commit is contained in:
@@ -38,7 +38,7 @@ public class Operators {
|
||||
expression to evaluate 2.0.
|
||||
Assign the evaluation to varible z3
|
||||
*/
|
||||
double z3 = ((double) x /(double) y * --d);
|
||||
double z3 = ((double) x /(double) y * (d - 1));
|
||||
//add code here
|
||||
System.out.println("z3: "+ z3 );
|
||||
|
||||
|
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.calebfontenot.lab5_calebfontenot;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class WhatsYourSSN {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// Create Scanner
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
// Declare vars
|
||||
String ssn;
|
||||
|
||||
// Prompt for input
|
||||
System.out.print("What's your SSN? ");
|
||||
ssn = input.next();
|
||||
|
||||
// Print output
|
||||
System.out.println(ssn + " is your SSN.");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user