3 solutions

  • 0
    @ 2024-10-29 15:34:31
    #include<stdio.h>
    int main()
    {  char a;
        scanf("%c",&a);
        for(int i=0;i<3;i++)
        {for(int j=3;j>i+1;j--)
        { printf(" ");
        }  for(int j=1;j<=2*i+1;j++)
        {
    printf("%c",a); }
        printf("\n");  }  return 0;
    }
    
    • 0
      @ 2023-10-18 15:06:04

      #include <stdio.h> int main() { char a; scanf("%c", &a); printf(" %c\n", a); printf(" %c%c%c\n", a, a, a); printf("%c%c%c%c%c\n", a, a, a, a, a); return 0; }

      • 0
        @ 2023-9-30 13:42:41
        #include<iostream>
        using namespace std;
        char a;
        int main()
        {
        	cin>>a;
        	cout<<"  "<<a<<endl;
        	cout<<" ";
        	for(int i=0;i<=2;i++)
        		cout<<a;
        	cout<<endl;
        	for(int i=0;i<5;i++)
        		cout<<a;
        	return 0;
        }
        
        • 1

        Information

        ID
        6715
        Time
        1000ms
        Memory
        128MiB
        Difficulty
        7
        Tags
        (None)
        # Submissions
        528
        Accepted
        131
        Uploaded By