Write a program that readsin an integer number from the keyboard. If the number
ID: 3612538 • Letter: W
Question
Write a program that readsin an integer number from the keyboard. If the number isbetween 1 and 10 (inclusive), the program prints on the monitor aright-triangle of asterisks ('*') where the height of the triangleis equal to the number read from the keyboard. If the numberis not between 1 and 10 (inclusive), the program terminates withoutprinting anything.
Ex. Keyboard input: 6
Output *
****
*****
******
Explanation / Answer
//Hope this will help you. #include #include int main() { int i,j,n; printf("Enter n:"); scanf("%d",&n); if(n< 1 || n >10 ) { printf("Not valid input "); }else { for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.