In this tutorial learn how you can generate the following output without using formatted I/O function. Here we are generating with the pattern.
You need to generate the following output.
*****
****
***
**
*
C programming is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, etc.
Here is the code to generate the following output without using formatted I/O function in C programming.
#include <stdio.h>/*Generate the following output without using formatted I/O function.
*****
****
***
**
*
*/
int main(){
int i,j,k;
for (i = 1; i <= 5 ; i++)
{
for ( j = 1; j < i; j++)
{
putchar(' ');
}
for ( k = i; k <= 5; k++)
{
putchar('*');
}
putchar('\n');
}
return 0;
}
This is how you can generate the following output without using formatted I/O function in C programming. Comment below if you like our tutorial.
I am live on these platform.Thus,you can contact me on the contact below.
0 Comments