create a C# program with control structures that will display the alphabet pattern of 'B' using asterisk. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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
14th Mar 2021, 11:42 AM
CalviÕ²
CalviÕ² - 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