create a C# program with control structures that will display the alphabet pattern of 'B' using asterisk. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

create a C# program with control structures that will display the alphabet pattern of 'B' using asterisk.

hai guys can someon help me on this?? i need Do while loop, while loop and for loop :< im new here i hope someone can help witht thos

12th Mar 2021, 1:58 AM
WhitePuddin
WhitePuddin - avatar
9 Answers
+ 1
Have you written some code or tried doing it yourself first? We can help you easily if you show us your code/attempt.
12th Mar 2021, 2:45 AM
Soumik
Soumik - avatar
13th Mar 2021, 9:50 AM
Calviղ
Calviղ - avatar
+ 1
Thankyouuu!!
13th Mar 2021, 10:14 AM
WhitePuddin
WhitePuddin - avatar
0
here! I have problem with the output this is do while loop int c = 1, r = 1, c2 = 1, r2 = 1, c3 = 1; do { Console.Write("*"); c++; } while (c <= 4); do { Console.WriteLine("* *"); r++; } while (r <= 2); do { Console.Write("*"); c2++; } while (c2 <= 4); do { Console.WriteLine("* *"); r2++; } while (r2 <= 2); do { Console.Write("*"); c3++; } while (c3 <= 4); Console.Readline(); } } }
12th Mar 2021, 4:56 AM
WhitePuddin
WhitePuddin - avatar
0
int c = 1, r = 1, c2 = 1, r2 = 1, c3 = 1; do { Console.Write("*"); c++; }while (c <= 4); //adding new line next, also just write Console.WriteLine(); here without adding \n in next output do { Console.WriteLine("\n* *"); r++; } while (r <= 2); do { Console.Write("*"); c2++; } while (c2 <= 4); do { Console.WriteLine("\n* *"); r2++; } while (r2 <= 2); do { Console.Write("*"); c3++; } while (c3 <= 4); Console.ReadLine();//use capital R, L
12th Mar 2021, 12:05 PM
Jayakrishna 🇮🇳
0
Me puedes ayudar a resolver esto. Pasar el primer nivel de un videojuego le da al jugador un punto. Por cada nivel subsiguiente que se pase, los puntos otorgados se incrementan en 1 (2 para el 2º nivel, 3 para el 3º, y así sucesivamente). El programa que se te da toma el número de niveles pasados como entrada. Completa la función dada para tomar ese número como argumento, y recursivamente calcula y devuelve el número total de puntos dados para todos los niveles pasados. Ejemplo de entrada 3 Ejemplo de salida 6 Explicación Nivel 1: 1 punto Nivel 2: 2 puntos Nivel 3: 3 puntos Total: 1+2+4 = 6 puntos.
14th Mar 2021, 4:37 AM
Fernanda Acuña
Fernanda Acuña - avatar
0
Hola me puedes ayudar
1st Oct 2021, 9:23 PM
Perla Hernández Guevara
Perla Hernández Guevara - avatar
- 1
Thankyou so much!
12th Mar 2021, 1:15 PM
WhitePuddin
WhitePuddin - avatar