vaakel_saab Posted February 4, 2021 Report Posted February 4, 2021 Six chairs are arranged along a circle. Starting clockwise remove the chair - at count 4 (4th chair in this case). Continue the same process with the fresh count starting from the 5th chair, remove the next chair at count 4, and so on until there is only 1 chair left. Write a function to achieve the result. write a program to PRINTXO(int n) ex: if n= 4 PRINT Below: xo ooxx xxxooo ooooxxxx PRINT Below   xo  ooxx  xxxooo ooooxxxx Quote
Popular Post Samara Posted February 4, 2021 Popular Post Report Posted February 4, 2021 print('xo\n'); print('ooxx\n'); print('xxxooo\n'); print('ooooxxxx); 1 6 Quote
Amrita Posted February 4, 2021 Report Posted February 4, 2021 5 minutes ago, Samara said: print('xo\n'); print('ooxx\n'); print('xxxooo\n'); print('ooooxxxx); This is now called out of box thinking 100/100 1 Quote
Samara Posted February 4, 2021 Report Posted February 4, 2021 4 minutes ago, Amrita said: This is now called out of box thinking 100/100 enduku spam seyyadam TS vachi tidatadu Quote
Amrita Posted February 4, 2021 Report Posted February 4, 2021 Just now, Samara said: enduku spam seyyadam TS vachi tidatadu Nenaite interview lo ela evaranna chepte/raste i will def select them. 1 Quote
dasari4kntr Posted February 4, 2021 Report Posted February 4, 2021 19 minutes ago, vaakel_saab said: Six chairs are arranged along a circle. Starting clockwise remove the chair - at count 4 (4th chair in this case). Continue the same process with the fresh count starting from the 5th chair, remove the next chair at count 4, and so on until there is only 1 chair left. Write a function to achieve the result. write a program to PRINTXO(int n) ex: if n= 4 PRINT Below: xo ooxx xxxooo ooooxxxx PRINT Below   xo  ooxx  xxxooo ooooxxxx using System; class HelloWorld { static void Main() { int n=4; for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { Console.Write(i%2==0?"X":"O"); } for(int k=1;k<=i;k++) { Console.Write(i%2==0?"O":"X"); } Console.WriteLine(" "); } } } this is for first question  https://onlinegdb.com/zLYQ1wDZX 1 Quote
JAMBALHOT_RAJA Posted February 4, 2021 Report Posted February 4, 2021 5 minutes ago, Amrita said: Nenaite interview lo ela evaranna chepte/raste i will def select them. eppudu chudaleda adi? Btech computer lab lo output alage chupinche vallu 🤣 Quote
dasari4kntr Posted February 4, 2021 Report Posted February 4, 2021 23 minutes ago, vaakel_saab said: Six chairs are arranged along a circle. Starting clockwise remove the chair - at count 4 (4th chair in this case). Continue the same process with the fresh count starting from the 5th chair, remove the next chair at count 4, and so on until there is only 1 chair left. Write a function to achieve the result. write a program to PRINTXO(int n) ex: if n= 4 PRINT Below: xo ooxx xxxooo ooooxxxx PRINT Below   xo  ooxx  xxxooo ooooxxxx this is for second question....  using System; class HelloWorld { static void Main() { int n=4; for(int i=1;i<=n;i++) { for(int m=n;m>=i;m--) { Console.Write(" "); } for(int j=1;j<=i;j++) { Console.Write(i%2==0?"X":"O"); } for(int k=1;k<=i;k++) { Console.Write(i%2==0?"O":"X"); } Console.WriteLine(" "); } } } https://onlinegdb.com/DfLt1nEfhi 1 Quote
Amrita Posted February 4, 2021 Report Posted February 4, 2021 1 minute ago, JAMBALHOT_RAJA said: eppudu chudaleda adi? Btech computer lab lo output alage chupinche vallu 🤣 Nope i never did. I missed all the fun then Quote
vaakel_saab Posted February 4, 2021 Author Report Posted February 4, 2021 9 minutes ago, dasari4kntr said: using System; class HelloWorld { static void Main() { int n=4; for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { Console.Write(i%2==0?"X":"O"); } for(int k=1;k<=i;k++) { Console.Write(i%2==0?"O":"X"); } Console.WriteLine(" "); } } } this is for first question Thanks ba Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.