1.12.123.1234 shape with C language including function
#include<stdio.h>
void fact(int num);
int main(void)
{
int n;
printf("enter your number : ");
scanf("%d", &n);
fact(n);
return 0;
}
void fact(int num)
{
for(int i=1; i<=num; i++)
{for(int j=1;j<=i;j++){
printf("%d", j);
}
printf("\n");
}
return ;
}
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment