Question
I need help with this assignment Create a Kotlin program that prints a right triangle with a base of 5 K's: K KK KKK KKKK
I need help with this assignment
Create a Kotlin program that prints a right triangle with a base of 5 K's:
K KK KKK KKKK KKKKK 1. First, use a while loop
2. Then use a for-loop
3. Print the triangle upside down with a reversed for-loop
4. Create a function that prints the triangle with any symbol and any base, and demonstrate with 10 K's.
Be sure to comment your code, and name your variables appropriately.
If you used the Kotlin playground, copy your program into a text file and name the file Yourname.Kt and upload the file here. If you used Android Studio, you can either ZIP the entire project or simply upload the MainActivity.kt file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started