+ 14
CODING CHALLENGE #4!! Tic tac toe game board
Yep... A fun game board... Remember, you need to ask the user what sthe size should be? For example... 3!! --- --- --- | | | | --- --- --- | | | | --- --- --- | | | | --- --- --- If the user inputs 4, there should be 4 rows and 4 columns... :) Have fun and no GOOGLE or STACKOVERFLOW...
19 Réponses
+ 12
@Edward If I could give more I would... But I have to be fair... :(
+ 11
@Ashwani You are right :)
+ 11
@Itsa Me Congratulations... You won!
@Edward It works, but when u input 6 the 4th row is not complete.
+ 11
@Gaga... That's nice, but I forgot to mention but no HTML..
+ 10
can anybody check out my board..
@Gami Am I right??
Did I get it??
https://code.sololearn.com/W219ZdCtdefI/?ref=app
+ 9
https://code.sololearn.com/cqHBDjKwhbA3/?ref=app
i did it but i think someone can do it more efficiently
+ 9
I will Try it.
is there is Gift.
^.^ 😃😃
+ 8
Seems difficult,gotta try it.Thanks for these @Gami,you provided another BIG reason to use SL.There gotta be a badge exclusive for you!!
+ 8
For added customization you input 2 numbers column and rows😎
EDIT: Oh what I'm late aww...
https://code.sololearn.com/c5CVQNB1dXA1/?ref=app
+ 7
@gami i hadnt noticed but i fixed it now. but @itsa me did it in a lot less lines of code, but its cause java doesnt let you multiply strings unlike python does sadly
+ 7
i understand. mine did not function correctly at first. and @denis you should have put it in code playground so we can test it
+ 7
@itsa i wasnt unpleased. u did it better than me
+ 6
I think this Challenge not meant to be done in web ?
M I correct ?
Otherwise i can simply create a dynamic table with border.
+ 3
I know web is cheating but still nice code
https://code.sololearn.com/Wo5CG91VmVS8/?ref=app
+ 2
// Using the same number of spaces as you did in your example.
#include <iostream>
int main()
{
int n = 0;
std::cin >> n;
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < n; ++j)
{std::cout << " --- ";}
std::cout << std::endl;
for (int j = 0; j < n; ++j)
{std::cout << "| ";}
std::cout << "|" << std::endl;
}
for (int j = 0; j < n; ++j)
{std::cout << " --- ";}
return 0;
}
+ 2
Shouldn't I be the winner since I posted first?
+ 2
@Edward seemed less than pleased that I did it in Python.. So, I threw together a Java version as well. it's linked in the same post as my Python code
+ 2
@Edward, since the code was short and simple, I just put it directly here. It was not tested but it works for sure.