Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int n=3;
- char tulosta_kolmioluku(int n);
- int main() {
- return tulosta_kolmioluku(n);
- }
- char tulosta_kolmioluku(int n) {
- int i,j,Tn = (n*(n+1))/2;
- for(i=1; i<=n; i++)
- {
- for(j=1; j<=i; ++j)
- {
- printf("*");
- }
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement