Turing machine is the theoretical model of computation
Answer:
int main()
{
int a,b,max,min;
cout<<"Enter 2 numbers\n";
cin>>a>>b; //asking numbers from user
max= a>b ? a : b; //using conditional operator to find larger
min= a>b ? b : a; //using conditional operator to find smaller
cout<<"\nLarger is "<<max;
cout<<"\nSmaller is "<<min;
return 0;
}
OUTPUT :
Enter 2 numbers
56
34
Larger is 56
Smaller is 34
Explanation:
- In the above program, first user is asked to enter 2 numbers which needs to be compared.
- Conditional operator - This operator contains syntax - (condition ? true : false) . This is a ternary operator in which first operand checks the condition and if its true second operand is returned otherwise third is returned.
- Then conditional operator is used twice first to find larger number and then smaller.
- At last both numbers are printed.
Can you please upload it again
Answer:
false
Explanation:
The role of a person can be chosen but is not always in this way, for example, if someone live in a dangerous place can get a negative role, and when a baby born into a family, maybe that kid has a brother, there are negative and positive roles, tattletale can be an example of a negative role, and the role can be different depends on the places, for example in your house, in school, or in your job.