-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 175ac0e
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Project exclude paths | ||
/out/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import java.util.Scanner; | ||
|
||
public class Calculator2 { | ||
public static void main(String[] args) { | ||
System.out.println("Enter The Current Free Cash Flow"); | ||
Scanner sc= new Scanner(System.in); | ||
double year0 = sc.nextDouble(); | ||
|
||
System.out.println("Please Enter The Growth Rate"); | ||
Scanner sc1= new Scanner(System.in); | ||
double growthRate = sc1.nextDouble(); | ||
|
||
System.out.println("Please Enter The Discount Rate"); | ||
Scanner sc2= new Scanner(System.in); | ||
double discountRate = sc2.nextDouble(); | ||
|
||
double year1 = year0 + year0 * growthRate; | ||
System.out.println(year1); | ||
double discountedYear1 = (year0 - year0 * discountRate); | ||
System.out.println(discountedYear1); | ||
|
||
double year2 = ((year1 + year1 * growthRate)); | ||
System.out.println(year2); | ||
double discountedYear2 = (year1 - year1 * discountRate); | ||
System.out.println(discountedYear2); | ||
|
||
double year3 = ((year2 + year2 * growthRate)); | ||
System.out.println(year3); | ||
double discountedYear3 = (year2 - year2 * discountRate); | ||
System.out.println(discountedYear3); | ||
|
||
double year4 = ((year3 + year3 * growthRate)); | ||
System.out.println(year4); | ||
double discountedYear4 = (year3 - year3 * discountRate); | ||
System.out.println(discountedYear4); | ||
|
||
double year5 = ((year4 + year4 * growthRate)); | ||
System.out.println(year5); | ||
double discountedYear5 = (year4 - year4 * discountRate); | ||
System.out.println(discountedYear5); | ||
|
||
double year6 = (year5 + year5 * growthRate); | ||
System.out.println(year6); | ||
double discountedYear6 = (year5 - year5 * discountRate); | ||
System.out.println(discountedYear6); | ||
|
||
double year7 = (year6 + year6 * growthRate); | ||
System.out.println(year7); | ||
double discountedYear7 = (year6 - year6 * discountRate); | ||
System.out.println(discountedYear7); | ||
|
||
double year8 = (year7 + year7 * growthRate); | ||
System.out.println(year8); | ||
double discountedYear8 = (year7 - year7 * discountRate); | ||
System.out.println(discountedYear8); | ||
|
||
double year9 = (year8 + year8 * growthRate); | ||
System.out.println(year9); | ||
double discountedYear9 = (year8 - year8 * discountRate); | ||
System.out.println(discountedYear9); | ||
|
||
double year10 = (year9 + year9 * growthRate); | ||
System.out.println(year10); | ||
double discountedYear10 = (year10 - year10 * discountRate); | ||
System.out.println(discountedYear10); | ||
|
||
|
||
System.out.println("Please Enter The Free Cash Flow Multiple"); | ||
Scanner sc3= new Scanner(System.in); | ||
double FCF_Multiple = sc3.nextDouble(); | ||
|
||
double terminalValue = (year10 * FCF_Multiple); | ||
System.out.println("The Terminal Value " + terminalValue); | ||
|
||
double discountedTerminalValue = (terminalValue - terminalValue * discountRate); | ||
System.out.println("Intrinsic Value Is "+ discountedTerminalValue); | ||
|
||
System.out.println("Please Enter Margin Of Safety Rate"); | ||
Scanner sc4= new Scanner(System.in); | ||
double marginOfSafetyRate = sc4.nextDouble(); | ||
double buyZonePrice = (discountedTerminalValue - discountedTerminalValue * marginOfSafetyRate); | ||
System.out.println("Buy Zone Price Is " + buyZonePrice); | ||
} | ||
} |