Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main(){
- /* Read input as specified in the question.
- * Print output as specified in the question.
- */
- int n;
- cin>>n;
- for(int i=0;i<n;i++)
- {
- for(int j=0;j<n;j++)
- cout<<n;
- cout<<'\n';
- }
- }
- #include<iostream>
- using namespace std;
- int main(){
- /* Read input as specified in the question.
- * Print output as specified in the question.
- */
- int n;
- cin>>n;
- for(int i=0;i<n;i++)
- {
- for(int j=0;j<=i;j++)
- cout<<'*';
- cout<<'\n';
- }
- }
- #include<iostream>
- using namespace std;
- int main(){
- /* Read input as specified in the question.
- * Print output as specified in the question.
- */
- int n;
- cin>>n;
- for(int i=1;i<=n;i++)
- {
- for(int j=0;j<i;j++)
- cout<<i;
- cout<<'\n';
- }
- }
- #include<iostream>
- using namespace std;
- int main(){
- /* Read input as specified in the question.
- * Print output as specified in the question.
- */
- int n;
- cin>>n;
- for(int i=1;i<=n;i++)
- {
- for(int j=i;j>0;j--)
- cout<<j;
- cout<<'\n';
- }
- }
- #include<iostream>
- using namespace std;
- int main(){
- /* Read input as specified in the question.
- * Print output as specified in the question.
- */
- int n;
- cin>>n;
- for(int i=1;i<=n;i++)
- {
- for(int j=1;j<=i;j++)
- cout<<char(64+i);
- cout<<'\n';
- }
- }
- /*Code by Surya a.k.a Sunny*/
- /* by https://www.codechef.com/users/spsc */
- #include <bits/stdc++.h>
- //#include <boost/multiprecision/cpp_int.hpp>
- #define lli long long
- #define pi 3.14159265358979323846
- #define MOD 1000000007
- #define unbuffer cin.clear(); cin.sync();
- #define foi(n) for(lli i=0;i<n;i++)
- #define foj(n) for(lli j=0;j<n;j++)
- #define test(T) lli T;cin>>T;while(T--)
- #define loop(i, a, b) for(int i = (a); i<= (b); i++)
- using namespace std;
- //using namespace boost::multiprecision;
- int main()
- {
- lli n,temp=1;
- cin>>n;
- for(int i=1;i<=n;i++)
- {
- temp=i;
- for(int j=1;j<=i;j++)
- {
- cout<<char(64+temp);
- temp++;
- }
- cout<<'\n';
- }
- }
- /*Code by Surya a.k.a Sunny*/
- /* by https://www.codechef.com/users/spsc */
- #include <bits/stdc++.h>
- //#include <boost/multiprecision/cpp_int.hpp>
- #define lli long long
- #define pi 3.14159265358979323846
- #define MOD 1000000007
- #define unbuffer cin.clear(); cin.sync();
- #define foi(n) for(lli i=0;i<n;i++)
- #define foj(n) for(lli j=0;j<n;j++)
- #define test(T) lli T;cin>>T;while(T--)
- #define loop(i, a, b) for(int i = (a); i<= (b); i++)
- using namespace std;
- //using namespace boost::multiprecision;
- int main()
- {
- lli n,temp=1;
- cin>>n;
- for(int i=n;i>0;i--)
- {
- temp=i;
- for(int j=i;j<=n;j++)
- {
- cout<<char(64+temp);
- temp++;
- }
- cout<<'\n';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement