Originally Posted by
matsp
So, how much do you understand about manipulating vectors in general - how would you put the number 6 in cell number 7 of a vector? Now, if you know that, how would you fill in the constant part of the Sudoku puzzle?
Also, what sort of input have you dealt with so far?
--
Mats
Never dealt with vectors before, was just an idea I cam across whilst reading my book, thought I could adapt from the Tic Tac Toe program from the book. I tried to adapt from it but it's proving a bit complicated...
Code:
void instructions()
{
cout << "Welcome to the ultimate man-machine showdown: Tic-Tac-Toe.\n";
cout << "--where human brain is pit against silicon processor\n\n";
cout << "Make your move known by entering a number, 0 - 8. The number\n";
cout << "corresponds to the desired board position, as illustrated:\n\n";
cout << " 0 | 1 | 2\n";
cout << " ---------\n";
cout << " 3 | 4 | 5\n";
cout << " ---------\n";
cout << " 6 | 7 | 8\n\n";
cout << "Prepare yourself, human. The battle is about to begin.\n\n";
}
about input, the only input i've done is something like this
Code:
#include <iostream>
using namespace std;
int main()
{
// Declarations
double celsius, fahrenheit;
// Input
cout << "Enter temperature in Celsius: ";
cin >> celsius;
cout << endl;
// Calculation
fahrenheit = (celsius*9)/5 +32;
// Output
cout << celsius << " Celsius is (approx.) ";
cout << fahrenheit << "F.";
cout << endl << endl;
return 0;
}