Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. int n=3;
  3. char tulosta_kolmioluku(int n);
  4.  
  5. int main() {
  6. return tulosta_kolmioluku(n);
  7. }
  8. char tulosta_kolmioluku(int n) {
  9. int i,j,Tn = (n*(n+1))/2;
  10. for(i=1; i<=n; i++)
  11. {
  12. for(j=1; j<=i; ++j)
  13. {
  14. printf("*");
  15. }
  16. printf("\n");
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement