Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int h;
- scanf("%d",&h);
- int i=0;
- int choinka=0;
- int spacja=h-i;
- if(h%2==0 || h%2!=0)
- {
- start:
- spacja=h-i;
- choinka=0;
- if(i<h)
- {
- spacj:
- if(spacja<0)
- {
- goto end;
- }
- printf(" ");
- spacja--;
- goto spacj;
- end:
- gwi:
- if(choinka>2*i){
- goto end2;
- }
- printf("*");
- choinka++;
- goto gwi;
- end2:
- printf("\n");
- }
- else if(i==h)
- {
- return 0;
- }
- zwieksz: i++;
- goto start;
- }
- return 0;
- }
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a=5,b=0,c;
- c=a;
- spacja:
- if(b>0){
- printf("*");
- }
- if(b<a)
- {
- b++;
- if(b==c)
- {
- printf("\n");
- c--;
- b=0;
- if(c==0){
- return 0;
- }
- }
- goto spacja;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement