The combination of Xs,Os, and blanks will approximately be somewhere between 2048 and about 4048. The combination’s total is 19, 683, but since the Xs and Os number will always be equal or off by 1, many cases are eliminated. Thus, the board is represented in 11 or 12 bits.
Answer:
num1 = int(input("Numerator: "))
num2 = int(input("Denominator: "))
if num1 < 1 or num2<1:
print("Input must be greater than 1")
else:
print("Quotient: "+str(num1//num2))
print("Remainder: "+str(num1%num2))
Explanation
The next two lines prompts the user for two numbers
<em>num1 = int(input("Numerator: "))</em>
<em>num2 = int(input("Denominator: "))</em>
The following if statement checks if one or both of the inputs is not positive
<em>if num1 < 1 or num2<1:</em>
<em> print("Input must be greater than 1")-> If yes, the print statement is executed</em>
If otherwise, the quotient and remainder is printed
<em>else:</em>
<em> print("Quotient: "+str(num1//num2))</em>
<em> print("Remainder: "+str(num1%num2))</em>
<em />
Answer:
Following are the program in c language
#include<stdio.h> // header file
int main() // main function
{
int ar[10],k,biggest; // variable declaration
printf("Enter the ten values:\n");
for (k = 0;k < 10; k++)
{
scanf("%d", &ar[k]); // user input of 10 number
}
biggest = ar[0]; // store the array index of 0 into biggest variable
for (k = 0; k< 10; k++) // finding the biggest number
{
if (ar[k] >biggest)
{
biggest = ar[k];
}
}
printf(" biggest num is %d", biggest); // display the biggest number
return 0;
}
Output:
Enter the ten values:
12
2
4
5
123
45
67
453
89
789
biggest num is 789
Explanation:
Here we declared an array ar[10] of type int which store the 10 integer values.
Taking 10 integer input from the user in array ar .After that iterating the loop and finding the biggest number by using if statement and store the biggest number in biggest variable .
Finally display biggest number.