Question: exercise 1 0 5 Write a program that reads a positive integer n from the keyboard and displays on the screen another integer whose digits

exercise 105
Write a program that reads a positive integer n from the keyboard and displays on the screen another integer whose digits are the sums modulo 10 of the digits of the representation of n in base 8 taken two by two. For example, if n=(28457926)10=(154435706)8, then the program must display 19726 because (0+1)%10=1,(5+4)%10=9,(4+3)%10=7,(5+7)%10=2,(0+6)%10=6.
ulate for a given x of type float the numerical value of a polynomial of degree n :
{:P(x)=Anxn+An-1xn-1+dots+A1x+A0
Values of n(integer), coefficients An,dots,AO(real) and x will be entered on the keyboard.
Use the Horner scheme that avoids power operations when calculating
6
We want to program a game similar to Mastermind. The goal of the game is to guess a sequence of 4 letters. First, the program randomly generates a word consisting of 4 different letters belonging to the set {a,b,c,d,e,f,g,h}. At each try, the player proposes a sequence of four letters. The program answers with a sequence consisting of 0,1 or 2. The 0 means that the letter is not in the sequence to be found, the 1 indicates that the letter is present but in the wrong place and the 2 Indicates that the letter is present and in the right place. The game ends when the player guesses the location of the 4 letters of the word to be guessed. The program displays then the number of trials.
Here is an example of a game where the word to guess (drawn randomly by the program) is "gabe":
Guess : abcd
1100
Guess : efab
1011
Guess : baeg
1211
Guess : gabe
2222
Won after 4 trials !!
Write the corresponding C# program.
exercise 1 0 5 Write a program that reads a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!