How to Code Star Patterns without Conditional Logic in Visual C++? For Beginners [closed]












-7















I was looking for the exact answer for my totally noob question, but I couldn't found the right one, so I'm here to ask you.
Why I can't print the star-triangles of the image under the code? My task is to use variables: "character output" (cout) + character literals: "newline" ("n") + tab ("t) and nothing more. I thought that I should put them in every single line, but clearly I was wrong. I couldn't use the output manipulator (flush) to continue at the same line without space or new row (maybe because I don't use the proper compiler and IDE for it).enter image description here



enter image description here



I hope to find the answer faster than you can publish it, even though I won't mind if you like to be my companion with my first steps of my IT adventure. :)



Cheerz!



enter image description here



enter image description here










share|improve this question















closed as unclear what you're asking by user463035818, Neil Butterworth, Swordfish, Weak to Enuma Elish, gnat Nov 23 '18 at 21:47


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • 1





    @Swordfish does it? omg, I should go and get read the first chapters again

    – user463035818
    Nov 23 '18 at 19:23











  • @user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

    – Swordfish
    Nov 23 '18 at 19:24








  • 1





    @Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

    – user463035818
    Nov 23 '18 at 19:32






  • 1





    there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

    – user463035818
    Nov 23 '18 at 19:41






  • 1





    @user463035818 Ah, scrolling solves the mytery. ^^

    – Swordfish
    Nov 23 '18 at 19:48
















-7















I was looking for the exact answer for my totally noob question, but I couldn't found the right one, so I'm here to ask you.
Why I can't print the star-triangles of the image under the code? My task is to use variables: "character output" (cout) + character literals: "newline" ("n") + tab ("t) and nothing more. I thought that I should put them in every single line, but clearly I was wrong. I couldn't use the output manipulator (flush) to continue at the same line without space or new row (maybe because I don't use the proper compiler and IDE for it).enter image description here



enter image description here



I hope to find the answer faster than you can publish it, even though I won't mind if you like to be my companion with my first steps of my IT adventure. :)



Cheerz!



enter image description here



enter image description here










share|improve this question















closed as unclear what you're asking by user463035818, Neil Butterworth, Swordfish, Weak to Enuma Elish, gnat Nov 23 '18 at 21:47


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • 1





    @Swordfish does it? omg, I should go and get read the first chapters again

    – user463035818
    Nov 23 '18 at 19:23











  • @user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

    – Swordfish
    Nov 23 '18 at 19:24








  • 1





    @Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

    – user463035818
    Nov 23 '18 at 19:32






  • 1





    there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

    – user463035818
    Nov 23 '18 at 19:41






  • 1





    @user463035818 Ah, scrolling solves the mytery. ^^

    – Swordfish
    Nov 23 '18 at 19:48














-7












-7








-7








I was looking for the exact answer for my totally noob question, but I couldn't found the right one, so I'm here to ask you.
Why I can't print the star-triangles of the image under the code? My task is to use variables: "character output" (cout) + character literals: "newline" ("n") + tab ("t) and nothing more. I thought that I should put them in every single line, but clearly I was wrong. I couldn't use the output manipulator (flush) to continue at the same line without space or new row (maybe because I don't use the proper compiler and IDE for it).enter image description here



enter image description here



I hope to find the answer faster than you can publish it, even though I won't mind if you like to be my companion with my first steps of my IT adventure. :)



Cheerz!



enter image description here



enter image description here










share|improve this question
















I was looking for the exact answer for my totally noob question, but I couldn't found the right one, so I'm here to ask you.
Why I can't print the star-triangles of the image under the code? My task is to use variables: "character output" (cout) + character literals: "newline" ("n") + tab ("t) and nothing more. I thought that I should put them in every single line, but clearly I was wrong. I couldn't use the output manipulator (flush) to continue at the same line without space or new row (maybe because I don't use the proper compiler and IDE for it).enter image description here



enter image description here



I hope to find the answer faster than you can publish it, even though I won't mind if you like to be my companion with my first steps of my IT adventure. :)



Cheerz!



enter image description here



enter image description here







c++ variables tabs char newline






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 23:31







Ms. Smarty Trousers

















asked Nov 23 '18 at 19:17









Ms. Smarty TrousersMs. Smarty Trousers

64




64




closed as unclear what you're asking by user463035818, Neil Butterworth, Swordfish, Weak to Enuma Elish, gnat Nov 23 '18 at 21:47


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as unclear what you're asking by user463035818, Neil Butterworth, Swordfish, Weak to Enuma Elish, gnat Nov 23 '18 at 21:47


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1





    @Swordfish does it? omg, I should go and get read the first chapters again

    – user463035818
    Nov 23 '18 at 19:23











  • @user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

    – Swordfish
    Nov 23 '18 at 19:24








  • 1





    @Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

    – user463035818
    Nov 23 '18 at 19:32






  • 1





    there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

    – user463035818
    Nov 23 '18 at 19:41






  • 1





    @user463035818 Ah, scrolling solves the mytery. ^^

    – Swordfish
    Nov 23 '18 at 19:48














  • 1





    @Swordfish does it? omg, I should go and get read the first chapters again

    – user463035818
    Nov 23 '18 at 19:23











  • @user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

    – Swordfish
    Nov 23 '18 at 19:24








  • 1





    @Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

    – user463035818
    Nov 23 '18 at 19:32






  • 1





    there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

    – user463035818
    Nov 23 '18 at 19:41






  • 1





    @user463035818 Ah, scrolling solves the mytery. ^^

    – Swordfish
    Nov 23 '18 at 19:48








1




1





@Swordfish does it? omg, I should go and get read the first chapters again

– user463035818
Nov 23 '18 at 19:23





@Swordfish does it? omg, I should go and get read the first chapters again

– user463035818
Nov 23 '18 at 19:23













@user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

– Swordfish
Nov 23 '18 at 19:24







@user463035818 I should go and get read the first chapters again – With a C++-gold badge? You're kidding me??

– Swordfish
Nov 23 '18 at 19:24






1




1





@Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

– user463035818
Nov 23 '18 at 19:32





@Swordfish reputation/badges dont mean a thing. If anything then my reputation reflects my curiosity

– user463035818
Nov 23 '18 at 19:32




1




1





there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

– user463035818
Nov 23 '18 at 19:41





there must be some misunderstanding. Nobody is trying to put you down. To the contrary. We are trying to help you. However, to do that we need your code. I cannot copy paste the image you posted to compile it and see what it does

– user463035818
Nov 23 '18 at 19:41




1




1





@user463035818 Ah, scrolling solves the mytery. ^^

– Swordfish
Nov 23 '18 at 19:48





@user463035818 Ah, scrolling solves the mytery. ^^

– Swordfish
Nov 23 '18 at 19:48












1 Answer
1






active

oldest

votes


















3














' ' can be calculated with: (char)(3 * 'n' + 2 * ('n' - 't'))
'*' can be calculated with: (char)(4 * 'n' + 2 * ('n' - 't'))



Clarification:

Given ASCII is used, 't' equals 9 and 'n' equals 10. To get the values of ' ' (32) and '*' (42) simply take 3 or 4 times 10 and add 2. To get 2 use 2 times the difference of 10 and 9:


32 = 3 * 10 + 2 * (10 - 9)

42 = 4 * 10 + 2 * (10 - 9)



Here you are:



#include <iostream>

int main()
{
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
}


Output:



*               **********      **********               *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********


If casts (char) are banned as well then use std::cout.put() instead of operator<<.

If multiplication is banned, replace with repeated addition.

If the use of integer literals is banned, replace them with multiple addition of ('n'-'t').

If addition and subtraction are banned, you're out of luck.






share|improve this answer


























  • Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:10











  • @Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

    – Swordfish
    Nov 23 '18 at 22:15













  • I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:24













  • @Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

    – Swordfish
    Nov 23 '18 at 22:27













  • I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:32


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














' ' can be calculated with: (char)(3 * 'n' + 2 * ('n' - 't'))
'*' can be calculated with: (char)(4 * 'n' + 2 * ('n' - 't'))



Clarification:

Given ASCII is used, 't' equals 9 and 'n' equals 10. To get the values of ' ' (32) and '*' (42) simply take 3 or 4 times 10 and add 2. To get 2 use 2 times the difference of 10 and 9:


32 = 3 * 10 + 2 * (10 - 9)

42 = 4 * 10 + 2 * (10 - 9)



Here you are:



#include <iostream>

int main()
{
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
}


Output:



*               **********      **********               *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********


If casts (char) are banned as well then use std::cout.put() instead of operator<<.

If multiplication is banned, replace with repeated addition.

If the use of integer literals is banned, replace them with multiple addition of ('n'-'t').

If addition and subtraction are banned, you're out of luck.






share|improve this answer


























  • Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:10











  • @Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

    – Swordfish
    Nov 23 '18 at 22:15













  • I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:24













  • @Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

    – Swordfish
    Nov 23 '18 at 22:27













  • I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:32
















3














' ' can be calculated with: (char)(3 * 'n' + 2 * ('n' - 't'))
'*' can be calculated with: (char)(4 * 'n' + 2 * ('n' - 't'))



Clarification:

Given ASCII is used, 't' equals 9 and 'n' equals 10. To get the values of ' ' (32) and '*' (42) simply take 3 or 4 times 10 and add 2. To get 2 use 2 times the difference of 10 and 9:


32 = 3 * 10 + 2 * (10 - 9)

42 = 4 * 10 + 2 * (10 - 9)



Here you are:



#include <iostream>

int main()
{
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
}


Output:



*               **********      **********               *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********


If casts (char) are banned as well then use std::cout.put() instead of operator<<.

If multiplication is banned, replace with repeated addition.

If the use of integer literals is banned, replace them with multiple addition of ('n'-'t').

If addition and subtraction are banned, you're out of luck.






share|improve this answer


























  • Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:10











  • @Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

    – Swordfish
    Nov 23 '18 at 22:15













  • I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:24













  • @Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

    – Swordfish
    Nov 23 '18 at 22:27













  • I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:32














3












3








3







' ' can be calculated with: (char)(3 * 'n' + 2 * ('n' - 't'))
'*' can be calculated with: (char)(4 * 'n' + 2 * ('n' - 't'))



Clarification:

Given ASCII is used, 't' equals 9 and 'n' equals 10. To get the values of ' ' (32) and '*' (42) simply take 3 or 4 times 10 and add 2. To get 2 use 2 times the difference of 10 and 9:


32 = 3 * 10 + 2 * (10 - 9)

42 = 4 * 10 + 2 * (10 - 9)



Here you are:



#include <iostream>

int main()
{
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
}


Output:



*               **********      **********               *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********


If casts (char) are banned as well then use std::cout.put() instead of operator<<.

If multiplication is banned, replace with repeated addition.

If the use of integer literals is banned, replace them with multiple addition of ('n'-'t').

If addition and subtraction are banned, you're out of luck.






share|improve this answer















' ' can be calculated with: (char)(3 * 'n' + 2 * ('n' - 't'))
'*' can be calculated with: (char)(4 * 'n' + 2 * ('n' - 't'))



Clarification:

Given ASCII is used, 't' equals 9 and 'n' equals 10. To get the values of ' ' (32) and '*' (42) simply take 3 or 4 times 10 and add 2. To get 2 use 2 times the difference of 10 and 9:


32 = 3 * 10 + 2 * (10 - 9)

42 = 4 * 10 + 2 * (10 - 9)



Here you are:



#include <iostream>

int main()
{
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
std::cout << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << 't' << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(3*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 't' << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << (char)(4*'n'+2*('n'-'t')) << 'n';
}


Output:



*               **********      **********               *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********


If casts (char) are banned as well then use std::cout.put() instead of operator<<.

If multiplication is banned, replace with repeated addition.

If the use of integer literals is banned, replace them with multiple addition of ('n'-'t').

If addition and subtraction are banned, you're out of luck.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 26 '18 at 19:19

























answered Nov 23 '18 at 20:31









SwordfishSwordfish

9,55211436




9,55211436













  • Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:10











  • @Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

    – Swordfish
    Nov 23 '18 at 22:15













  • I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:24













  • @Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

    – Swordfish
    Nov 23 '18 at 22:27













  • I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:32



















  • Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:10











  • @Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

    – Swordfish
    Nov 23 '18 at 22:15













  • I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:24













  • @Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

    – Swordfish
    Nov 23 '18 at 22:27













  • I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

    – Ms. Smarty Trousers
    Nov 23 '18 at 22:32

















Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

– Ms. Smarty Trousers
Nov 23 '18 at 22:10





Thank you, but I don't want from you to do the thing instead of me, because I have nothing in return, also you don't do me a favour. I want to learn how to do it - is that simple. Your way is far more difficult that I want. That is not the easiest solution. You include operators which made the situation hard understandable for person on basic level. Sorry... Self-education is not always the best decision to make. The sad part is that paid education not offer something better. I'll give myself away and also I rather kill myself than continue that torture and nightmare.

– Ms. Smarty Trousers
Nov 23 '18 at 22:10













@Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

– Swordfish
Nov 23 '18 at 22:15







@Ms.SmartyTrousers I hope to find the answer faster than you can publish it – ??? – Your way is far more difficult that I want. That is not the easiest solution. – How can you possibly tell that it is not the easiest solution when you don't know of *any* working solution at all? – You include operators which made the situation hard understandable for person on basic level. – feel free to ask about things you don't understand.

– Swordfish
Nov 23 '18 at 22:15















I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

– Ms. Smarty Trousers
Nov 23 '18 at 22:24







I saw with my own eyes one person who made the ******* triangles with no algorithms. I can't remember how, because I didn't understand the terminology then. Now I'm sure that he didn't use arithmetic or conditional operators, nor logic, loops, forms, methods, arrays, etc. It was short and easy. How is that possible to can't find the solution in the whole web? I'm shocked and nervious and I want to give up. There is no point of doing that. There're things that I understand and I'm good at... that's the one thing that I don't understand and I'm not good at.

– Ms. Smarty Trousers
Nov 23 '18 at 22:24















@Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

– Swordfish
Nov 23 '18 at 22:27







@Ms.SmartyTrousers Given only std::cout, 't' and 'n' it is not possible to do at all without calculating the values needed to represent space and star characters.

– Swordfish
Nov 23 '18 at 22:27















I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

– Ms. Smarty Trousers
Nov 23 '18 at 22:32





I wish I could argue, but I can't prove anything. Anyways, if you want, please, look at the second photo which I attached. Why I can do the first two triangles, but the second ones - they are asymmetric and useless.

– Ms. Smarty Trousers
Nov 23 '18 at 22:32





Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen