diff options
Diffstat (limited to '3831/CH18/EX18.6/Ex18_6.sce')
-rw-r--r-- | 3831/CH18/EX18.6/Ex18_6.sce | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/3831/CH18/EX18.6/Ex18_6.sce b/3831/CH18/EX18.6/Ex18_6.sce new file mode 100644 index 000000000..eb8c7e1d6 --- /dev/null +++ b/3831/CH18/EX18.6/Ex18_6.sce @@ -0,0 +1,10 @@ +// Example 18_6
+clc;funcprot(0);
+// Given data
+P_ace=4/52;// The probability of getting ace
+P_spade=13/52;// The probability of getting spade
+P_aceofspades=1/52;// The probability of getting ace of spades
+
+// Calculation
+P=(P_ace+P_spade-P_aceofspades)*100;// The probability that it will be an ace or a spade in %
+printf("\nThe probability that it will be an ace or a spade,P=%2.1f percentage",P);
|