For CSC510 GROUP PROJECT- Question 1.pdf

2023406116 55 views 27 slides Mar 06, 2025
Slide 1
Slide 1 of 27
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27

About This Presentation

group project


Slide Content

Sem– 2025 JAN ​Question chosen: 1 ​ ​Group name: Labubu ​
Group – Members (Name, Matric Number, and Group):
​​ GROUP: CDCS2553A
1.​IRFAN NAZMI BIN MOHD SALIKHIN (2023414534)
2.​NUR FATIN SYAZWANI BINTI MOHAMAD ZIN (2023406116)
3.​FATIN NAZILAH MOHD NAZLI (2023814014)
Project Rubric (Presentation) – CSC 510 (Discrete Structure)
No. Assesment Criteria Excellent (5) Good (4) Satisfactory (3) Poor (2)
1 Depth of knowledge Clear and easily understood.
Shows depth of thought. Able to
answer questions in an
intelligent manner
Certain areas show depth of thought.
Mostly clear but with little
confusion in the presentation. Able
to answer question
Some understanding of subject but
little depth. Somewhat clear and
some confusion in the presentation.
Able to answer some questions
Show a surface knowledge only. Unclear
and confusing. Leaves the
listener a little lost. Unable to respond
to questions
2 Use variety of
presentation materials
Presentation material/media are of
high quality and useful
Most material/media are of high
quality. Some variety in material
used
Some materials/media are of high
quality with some questionable
sources
Material/media are inadequate or
barely minimum presentation materials or
too small to see
3 Delivery skills Presenter speaks clearly and loud
enough for all in the audience to
hear, makes no grammatical errors,
pronounces all terms correctly and
precisely. Excellent eye contact
Presenter speaks clearly and loud
enough to be heard by most in the
audience, makes relatively few
grammatical errors, and pronounces
most terms correctly. Good eye
contact
Presenter’s voice is relatively clear,
but too low to be heard by those in
the back of the room. Presenter
makes some grammatical errors
and mispronounces some terms.
Some eyes contact.
Presenter mumbles, mispronounces terms,
and makes serious and persistent
grammatical errors throughout the
presentation.
Presenters speak too quietly to be
heard by many in the audience. Very poor
eye contact
4 Overall organization
of project
presentation
Presenter has a smooth
presentation flow and provides
good explanations and / or
elaboration, use time wisely
Presenter provides explanations
and / or elaboration, use time
wisely
Presenter provides explanations and
/ or insufficient elaboration and use
of time
There is no presentation flow. Goes over
time limit or does not fully cover the topics
Solution Solution
demonstration
Very clearly demonstrated Clearly demonstrated Adequately demonstrated Not clearly demonstrated

Criteria 1 (max
5m)
Criteria 2 (max
5m)
Criteria 3 (max
5m)
Criteria 4 (max 5m) Solution demonstration
(max 5m)
Total
( ​ / 25) = ​

Project Rubric (Report & Product) – CSC 510 (Discrete Structure)
No. Assessment Criteria Excellent (2) Good (1.5) Satisfactory (1) Poor (0)
1 Report Submit and complete Submit and almost complete Submit but not complete No submission
2 Introduction Well-definedproject
background,problem
statement and scope
Clear project background,
problem statement and scope
Adequate project
background, problem
statement and scope
Unclear project
background,
problem statement
and scope
3 Roles and duty of each
member
Well-defined Clearly defined Adequate defined No defined
4 Algorithm of system
(Flow chart or
pseudocode)
Highly reflect to design Clearly reflect to design Adequately reflect to design Poorly reflect to design
5 Interface of system
(welcome screen, sample
input output etc.)
Professional looking (using GUI-
button, text field, radio button,
image etc.) and accurate
representation of the result.
Clear representation of the result. Adequate representation of
the result.
Result are no
shown or are
inaccurate
6 Analysis of result (result
discussion)
High critical analysis of the result Clear critical analysis of the result Adequate critical analysis of the
result
No critical analysis of the
result
7 Conclusion Conclusion includes the
findings, lesson learned from
the project. ​
Future recommendations to real
life situations are well stated
Conclusion includes the
findings, lesson learned from
the project.
Recommendations for future
work are stated
Conclusion includes the
findings, lesson learned from
the project. Some
recommendations for future
work is stated
No conclusion or
recommendations
were included in
the report
8 Programming code (All
CODE should be
documented with
comment).
Complete attached (with comment)
in appendix
Completed attached
(without/inadequate comment) in
appendix
Adequate attached in appendix No attached
Product Requirement fulfillment Done with correct output Done with partial correct output Done but with incorrect output Not Done


Criteria 1
(max 2m)
Criteria 2
(max 2m)
Criteria 3
(max 2m)
Criteria 4
(max 2m)
Criteria 5
(max 2m)
Criteria 6
(max 2m)
Criteria 7
(max 2m)
Criteria 8
(max 2m)
Product
(max 9m)
Total
( ​ / 25) = ​

TABLE OF CONTENT


NO CONTENT OUTLINE
1.​Introduction
1.1 Background study
1.2 Problem statement
1.3 Scope
2.​Algorithm of the system
2.1 Flowchart
2.2 Pseudocode
3.​Interface of the system
4.​Analysis of result
5.​Conclusion
6.​Programming code
6.1 Source code -Image
6.2 Source code -Text

Assign tasks based on members:
●​NUR FATIN SYAZWANI BINTI MOHAMAD ZIN :
○​Research and design the system's algorithm (flowchart/pseudocode).
○​Write the "Introduction" and "Algorithm" sections of the report.

●​IRFAN NAZMI BIN MOHD SALIKHIN :
○​Develop the inference engine (programming).
○​Create sample input/output and test the application.
○​Write the "Programming Code" and "Analysis of Results" sections.

●​FATIN NAZILAH MOHD NAZLI :
○​Design the report structure and prepare the video presentation.
○​Handle documentation (adding comments in the code, writing the "Conclusion," and
assembling the report).

1.0 INTRODUCTION


1.1 Background study

Q1: Rules of Inference (Propositional Logic)

Introduction
Logical reasoning is a fundamental aspect of computer science and mathematics, particularly in
artificial intelligence, automated theorem proving, and decision-making systems. The Rules of Inference
provide a systematic way to derive conclusions from given premises, ensuring logical consistency.
Propositional logic, as a core component of discrete mathematics, serves as the foundation for formal
reasoning. This project aims to implement an Inference Rules Engine that applies eight fundamental
inference rules to validate logical statements.
Propositional Logic
Propositional logic is a formal system used in discrete mathematics to represent and analyze logical
statements. It consists of:
●​Propositions: Statements that are either True or False.
●​Logical Connectives: Operators such as AND (∧), OR (∨), NOT (¬), IMPLICATION (→), and
BICONDITIONAL (↔).
●​Inference Rules: Standardized logical rules used to derive conclusions from premises.
Rules of Inference
The eight fundamental Rules of Inference used in propositional logic include:
1.​Modus Ponens: If P → Q and P are true, then Q must be true.
2.​Modus Tollens: If P → Q and ¬Q are true, then ¬P must be true.
3.​Hypothetical Syllogism: If P → Q and Q → R are true, then P → R is true.
4.​Disjunctive Syllogism: If P ∨ Q and ¬P are true, then Q must be true.
5.​Addition: If P is true, then P ∨ Q is also true.
6.​Simplification: If P ∧ Q is true, then P is true.
7.​Conjunction: If P and Q are true separately, then P ∧ Q is true.
8.​Resolution: If P ∨ Q and ¬P ∨ R are true, then Q ∨ R is true.

1.2 Problem statement

Q1: Manually verifying logical statements can be complex and error-prone, especially when dealing with
large arguments or multiple inference rules. Logical inconsistencies and human errors often arise when
manually applying inference rules, making it difficult to ensure accurate reasoning.
This project aims to automate the inference process by developing a system that:
●​Converts natural language hypotheses into propositional logic expressions.
●​Applies predefined inference rules to validate logical conclusions.
●​Provides a step-by-step derivation of the reasoning process.


1.3 Scope
The project focuses on building an inference engine that applies eight fundamental rules of inference in
propositional logic:
1.​Modus Ponens
2.​Modus Tollens
3.​Hypothetical Syllogism
4.​Disjunctive Syllogism
5.​Addition
6.​Simplification
7.​Conjunction
8.​Resolution
The system will:
●​Accept the inference rules (1 - 8) as input.
●​Apply the appropriate inference rule to determine conclusions.
●​Display step-by-step reasoning for each inference.
●​Include an intuitive interface for user interaction.
The project does not cover:
●​Predicate logic or first-order logic.
●​Complex theorem proving beyond basic propositional inference.

2.0 ALGORITHM OF THE SYSTEM

2.1 → FLOWCHART

2.2→PSEUDOCODE
Main

1.​START
2.​DO
2.1 DISPLAY "LIST OF INFERENCE RULES"
2.2 DISPLAY "1. Modus Ponens"
2.3 DISPLAY "2. Modus Tollens"
2.4 DISPLAY "3. Hypothetical Syllogism
2.5 DISPLAY "4. Disjunctive Syllogism"
2.6 DISPLAY "5. Addition"
2.7 DISPLAY "6. Simplification"
2.8 DISPLAY "7. Conjunction"
2.9 DISPLAY "8. Resolution"
2.10 READ inference
2.11 SWITCH (inference)
2.11.1 CASE 1:
2.11.1.1 CALL modusPonens()
2.11.1.2 BREAK
2.11.2 CASE 2:
2.11.2.1 CALL modusTollens()
​​ 2.11.2.2 BREAK
2.11.3 CASE 3:
2.11.3.1 CALL hypotheticalSyllogism()
2.11.3.2 BREAK
2.11.4 CASE 4:
2.11.4.1 CALL disjunctiveSyllogism()
2.11.4.2 BREAK
2.11.5 CASE 5:
2.11.5.1 CALL addition()
​ 2.11.5.2 BREAK
2.11.6 CASE 6:
2.11.6.1 CALL simplification()
​ 2.11.6.2 BREAK
2.11.7 CASE 7:
2.11.7.1 CALL conjunction()
​ 2.11.7.2 BREAK
2.11.8 CASE 8:
2.11.8.1 CALL resolution()
​ 2.11.8.2 BREAK
2.11.9 DEFAULT:
2.11.9.1 DISPLAY "Invalid choice. Please enter a
________________number between 1 and 8."
2.12 END SWITCH
2.13 DISPLAY "Do you want to apply another inference rule? (Y/N): "
2.14 READ userChoice
2.15 CLEAR screen
3.​WHILE userChoice == "Y"
4.​DISPLAY "Thank you for using the inference rules program!"
5.​STOP

Modus Ponens Function

1.​START
2.​FUNCTION modusPonens()
2.1​ DISPLAY "Premise 1 (P): Ali works hard. (TRUE)"
2.2​ DISPLAY "Premise 2 (P -> Q): If Ali works hard, then he is a
____________dull boy. (TRUE)"
2.3​ DISPLAY "Premise 3 (Q -> R): If Ali is a dull boy, then he
____________will not get the job. (TRUE)"
2.8​ DISPLAY "Conclusion (R): 'Ali will not get the job' is
____________valid."
2.9​ DISPLAY "Used rules: Modus Ponens."
3.​END FUNCTION
4.​CALL modusPonens()
5.​STOP



Modus Tollens Function

1.​START
2.​FUNCTION modusTollens()
2.1​ DISPLAY "Premise 1 (P -> Q): If Ali works hard, then he is a
____________dull boy. (TRUE)"
2.2​ DISPLAY "Premise 2 (Q -> R): If Ali is a dull boy, then he
____________will not get the job. (TRUE)"
2.3​ DISPLAY "Premise 3 (~R): Ali will get the job. (FALSE)"
2.4​ DISPLAY "Conclusion (~P): 'Ali does not work hard' is not
____________valid."
2.5​ DISPLAY "Used rules: Modus Tollens."
3.​END FUNCTION
4.​CALL modusTollens()
5.​STOP


Hypothetical Syllogism Function

1.​START
2.​FUNCTION hypotheticalSyllogism()
2.1​ DISPLAY "Premise 1 (P -> Q): If Ali works hard, then he is a
____________dull boy. (TRUE)"
2.2​ DISPLAY "Premise 2 (Q -> R): If Ali is a dull boy, then Ali
____________will not get the job. (TRUE)"
2.3​ DISPLAY "Conclusion: 'If Ali works hard, then Ali will not
____________get the job' is valid."
2.4​ DISPLAY "Used rules: Hypothetical Syllogism."
3.​END FUNCTION
4.​CALL hypotheticalSyllogism()
5.​STOP

Disjunctive Syllogism Function

1.​START
2.​FUNCTION disjunctiveSyllogism()
2.1​ DISPLAY "Premise 1 (P v Q): Ali works hard or Ali is a dull
___________ boy.(TRUE)"
2.2​ DISPLAY "Premise 2 (~Q): Ali does not study. (FALSE)"
2.5​ DISPLAY "Conclusion (P): 'Ali works hard' is valid."
2.6​ DISPLAY "Used rules: Disjunctive Syllogism."
3.​END FUNCTION
4.​CALL disjunctiveSyllogism()
5.​STOP



Simplification Function

1.​START
2.​FUNCTION simplification():
2.1​ DISPLAY "Premise 1(P ^ Q): Ali works hard and Ali is a dull
____________boy.(TRUE)"
2.2​ DISPLAY "Conclusion (P): 'Ali will not get the job' is
____________valid."
2.3​ DISPLAY "Used rules: Simplification."
3.​END FUNCTION
4.​CALL simplification()
5.​STOP


Conjunction Function

1.​START
2.​FUNCTION conjunction()
2.1​ DISPLAY "Premise 1 (P): Ali works hard. (TRUE)"
2.2​ DISPLAY "Premise 2 (Q): Ali is a dull boy. (TRUE)"
2.3​ DISPLAY "Premise 3 (R): Ali will not get the job. (TRUE)"
2.4​ DISPLAY "Conclusion (P ^ Q ^ R): 'Ali works hard, Ali is a
____________dull boy, and Ali will not get the job' is valid."
2.5​ DISPLAY "Used rules: Conjunction."
3.​END FUNCTION
4.​CALL conjunction()
5.​STOP

Addition Function

1.​START
2.​FUNCTION addition()
2.1​ DISPLAY "Premise 1 (P): Ali works hard. (TRUE)"
2.2​ DISPLAY "Premise 2 (Q): Ali is a dull boy. (TRUE)"
2.3​ DISPLAY "Conclusion (P v Q): 'Ali works hard or Ali is a
____________dull boy' is valid."
2.4​ DISPLAY "Used rules: Addition."
3.​END FUNCTION
4.​CALL addition()
5.​STOP




Resolution Function

1.​START
2.​FUNCTION resolution():
2.1​ DISPLAY "Premise 1 (P v Q): Ali works hard or Ali is a dull
____________boy.(TRUE)"
2.2​ DISPLAY "Premise 2 (~Q v R): Ali is not a dull boy or Ali
____________will get the job. (FALSE)"
2.3​ DISPLAY "Conclusion (P v R): 'Ali works hard or Ali will get
____________the job' is valid."
2.4​ DISPLAY "Used rules: Resolution."
3.​END FUNCTION
4.​CALL resolution()
5.​STOP

3.0 INTERFACE OF THE SYSTEM

4.0 ANALYSIS OF RESULT


The provided application allows users to experiment with different logical reasoning strategies by
implementing different propositional logic inference rules. The application offers eight essential inference
rules: Addition, Simplification, Conjunction, Resolution, Hypothetical Syllogism, Disjunctive Syllogism,
Modus Ponens, and Modus Tollens. A valid conclusion is obtained by applying a logical structure to a set
of premises in each rule.

The results of the program demonstrate the effectiveness of logical reasoning in drawing
conclusions from presumptive data. For example, the premises "Ali works hard" , "If Ali works hard, then
he is a dull boy" and “If Ali is a dull boy, then he will not get the job” are true in Modus Ponens lend
credence to the logical conclusion that "Ali will not get the job." Similarly, in Modus Tollens, if the premise
is that " If Ali works hard, then he is a dull boy." and "If Ali is a dull boy, then he will not get the job" is true
but the premise “Ali will get the job” is false, then the conclusion that "Ali does not work hard" is
considered invalid.

According to the Hypothetical Syllogism, if "Ali works hard, then he is a dull boy" and "If Ali is a
dull boy, then he will not get the job," are true then the conclusion "If Ali works hard, then he will not get
the job" is valid. When at least one of the two premises must be true, a Disjunctive Syllogism is employed.
Given the scenario "Ali works hard or Ali is a dull boy," the conclusion "Ali works hard" is valid.
Simplification states that each premise must be true on its own if the conjunction of two premises
is true. For instance, we can conclude that (P): "Ali works hard" is valid given the premise (P ∧ Q): "Ali
works hard and Ali is a dull boy" is true. Conjunction, on the other hand, combines several premises into a
single assertion. For example, we can conclude that (P ∧ Q ∧ R): "Ali works hard, Ali is a dull boy, and
Ali will not get the job" is valid given the premises (P): "Ali works hard" , (Q): "Ali is a dull boy" , and (R):
"Ali will not get the job" are true. Resolution is a fundamental principle in propositional logic that
demonstrates how combining premises can result in sound conclusions. This is clear when the claim that
"Ali works hard or Ali will get the job" is valid.

Overall, the program effectively demonstrates the application of inference rules in practical logical
reasoning. By allowing users to select and test various rules, it highlights the structured approach of
formal logic in problem-solving and decision-making. The interactive components of the program enhance
understanding of logical principles and their significance in automated reasoning systems.

5.0 CONCLUSION

This project successfully implements an Inference Engine that applies the eight fundamental rules
of inference Modus Ponens, Modus Tollens, Hypothetical Syllogism, Disjunctive Syllogism, Addition,
Simplification, Conjunction, and Resolution to analyze and validate propositional logic statements. By
allowing users to enter logical premises and selecting the appropriate inference rule, the program
efficiently determines the logical consistency of statements and provides structured conclusions. The system effectively translates English statements into propositional logic, applies the relevant
inference rules, and derives logical conclusions. For example, using Modus Ponens, the system correctly
infers that "Ali will not get the job" based on structured premises. Similarly, Modus Tollens accurately
deduces that "Ali does not work hard" when provided with appropriate logical conditions. These results
highlight the accuracy and efficiency of the program in performing logical reasoning, making it a valuable
tool for understanding discrete mathematics and propositional logic. The implementation of this inference engine provides an excellent foundation for further
exploration in artificial intelligence, automated reasoning, and decision making systems. It demonstrates
how logic based computational models can enhance problem-solving and critical thinking, particularly in
fields requiring formal reasoning and logical validation. The structured approach to logical inference and
rule application ensures a clear and systematic analysis of logical statements, reinforcing the importance
of discrete structures in computer science. Overall, this project serves as a practical and insightful application of discrete mathematics,
showcasing the power of propositional logic and inference rules in logical reasoning and computational
problem-solving.

6.0 PROGRAMMING CODE

6.1 Source code -Image

6.2 Source code -Text

#include <iostream>
#include <string>
#include <cstdlib>
#include <windows.h>

using namespace std;

// Implementing Modus Ponens
void modusPonens()
{
cout << "\nPremise 1 (P): Ali works hard. (TRUE)";
​ cout << "\nPremise 2 (P -> Q): If Ali works hard, then he is a dull boy. (TRUE)";
​ cout << "\nPremise 3 (Q -> R): If Ali is a dull boy, then he will not get the job. (TRUE)";

​ cout << "\n\nConclusion (R): 'Ali will not get the job' is valid." << endl;
​ cout << "\nUsed rules: Modus Ponens." << endl;
}

// Implementing Modus Tollens
void modusTollens()
{
​ cout << "\nPremise 1 (P -> Q): If Ali works hard, then he is a dull boy. (TRUE)";
​ cout << "\nPremise 2 (Q -> R): If Ali is a dull boy, then he will not get the job. (TRUE)";
​ cout << "\nPremise 3 (~R): Ali will get the job. (FALSE)";

​ cout << "\n\nConclusion (~P): 'Ali does not work hard.' is not valid." << endl;
​ cout << "\nUsed rules: Modus Tollens." << endl;
}

// Implementing Hypothetical Syllogism
void hypotheticalSyllogism()
{
​ cout << "\nPremise 1 (P -> Q): If Ali works hard, then he is a dull boy. (TRUE)";
cout << "\nPremise 2 (Q -> R): If Ali is a dull boy, then Ali will not get the job. (TRUE)";

​ cout << "\n\nConclusion (P -> R): 'If Ali works hard, then Ali will not get the job' is valid."

<< endl;
cout << "\nUsed rules: Hypothetical Syllogism." << endl;
}

// Implementing Disjunctive Syllogism
void disjunctiveSyllogism()
{
cout << "\nPremise 1 (P v Q): Ali works hard or Ali is a dull boy. (TRUE)";
​ cout << "\nPremise 2 (~Q): Ali does not study. (FALSE)";

​ cout << "\n\nConclusion (P): 'Ali works hard' is valid." << endl;
​ cout << "\nUsed rules: Disjunctive Syllogism." << endl;
}

// Implementing Simplification
void simplification()
{
​ cout << "\nPremise 1 (P ^ Q): Ali works hard and Ali is a dull boy. (TRUE)";
​​​
cout << "\n\nConclusion (P): 'Ali works hard' is valid." << endl;
​ cout << "\nUsed rules: Simplification." << endl;
}

// Implementing Conjunction
​ void conjunction()
{
​ cout << "\nPremise 1 (P): Ali works hard. (TRUE)";
​ cout << "\nPremise 2 (Q): Ali is a dull boy. (TRUE)";
​ cout << "\nPremise 3 (R): Ali will not get the job. (TRUE)";

​ cout << "\n\nConclusion (P ^ Q ^ R): Therefore, 'Ali works hard, Ali is a dull boy, and Ali
will not get the job' is valid." << endl;
​ cout << "\nUsed rules: Conjunction." << endl;
}

// Implementing Addition
void addition()

{
​ cout << "\nPremise 1 (P): Ali works hard. (TRUE)";
​ cout << "\nPremise 2 (Q): Ali is a dull boy. (TRUE)";

​ cout << "\n\nConclusion (P v Q): 'Ali works hard or Ali is a dull boy.' is valid." << endl;
​ cout << "\nUsed rules: Addition." << endl;​
}

// Implementing Resolution
void resolution()
{​
​ cout << "\nPremise 1 (P v Q): Ali works hard or Ali is a dull boy. (TRUE)";
​ cout << "\nPremise 2 (~Q v R): Ali is not a dull boy or Ali will get the job. (FALSE)";

​ cout << "\n\nConclusion (P v R): 'Ali works hard or Ali will get the job.' is valid." << endl;
​ cout << "\nUsed rules: Resolution." << endl;
}

int main()
{
​ int inference;
​ char userChoice;

​ do{
​ Sleep(300);
​​ cout << "-------------------------------------------------------------\n";
​​ cout << "****************** LIST OF INFERENCE RULES ******************\n";
​​ cout << "-------------------------------------------------------------\n";
​​ cout << "1. Modus Ponens\n";
​​ cout << "2. Modus Tollens\n";
​​ cout << "3. Hypothetical Syllogism\n";
​​ cout << "4. Disjunctive Syllogism\n";
​​ cout << "5. Addition\n";
​​ cout << "6. Simplification\n";
​​ cout << "7. Conjunction\n";
​​ cout << "8. Resolution\n";
​​ cout << "-------------------------------------------------------------";

​​ cout << "\n*************************************************************";
​​ cout << "\n-------------------------------------------------------------";
​​ cout << "\n\nChoose Inference Rules (1 - 8): ";
​​ cin >> inference;
​​
​ switch (inference)
​ {
case 1:
​​​​ modusPonens();
​​​​ break;
​​ case 2:
​​​​ modusTollens();
​​​​ break;
​​ case 3:
​​​​ hypotheticalSyllogism();
​​​​ break;
​​ case 4:
​​​​ disjunctiveSyllogism();
​​​​ break;
​​ case 5:
​​​​ addition();
​​​​ break;
​​ case 6:
​​​​ simplification();
​​​​ break;
​​ case 7:
​​​​ conjunction();
​​​​ break;
​​ case 8:
​​​​ resolution();
​​​​ break;
​​ default:
​​​ cout << "Invalid choice. Please enter a number between 1 and 8.\n";
​ }
​ ​
​ cout << "\nDo you want to apply another inference rule? (Y/N): ";
​ cin >> userChoice;

​ userChoice = toupper(userChoice);
​ Sleep(1000);​​ //Sleep for 1000 miliseconds
​ system("cls");​​ //Clear screen

​ }while (userChoice == 'Y');

​ cout << "\nThank you for using the inference rules program!\n";
return 0;​
}
Tags