Your Mission: Three programming projects; three source code files; Only hand in the last 3 of the 4 projects listed below. You're source code for these files should be handed in both electronically, using "submit" as for HW 1, and also physically, printed out as a hard copy. This way, your TA can try your code, and also has a copy to write comments on.
Please enter a string: User types this string U s e r t y etcetera...To do this, print each character on a seperate line, with n - 1 spaces before the nth character. For example, the first character (character number 0) will appear at the beginning of a line, but character number 9 will appear after 9 spaces. Here are a few technical words of wizzdom to help:
printf(" ");
include "strlib.h";will give you access to two useful functions, StringLength(string), and IthChar(string,i). You can probably make an educated guess how to use them, or you can look them up in the index of your text for more details.
#include <math.h>
Each of your guesses can only count once in the second part of the hint. For example, if the computer picks (2,2,2) and you guess (1,2,3), the hint is "1" and "1". However, if the computer picked (1,2,3) and you guess (2,2,2), the response should be "1", "3".
You will need to include the random library with,
#include "random.h"in order to generate random values. RandomInteger(low,high) will then produce a random integer between low and high, and will give you a different one each time you call it. However, it will always produce the same sequence of values unless you call Randomize().
Here are requirements and suggestions for your implementation: