Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions HelloWorld/helloworld.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include<stdio.h>
#include<iostream>
int main()
{
printf("Hello World!");
}
#include<stdio.h>
#include<iostream>

int main()
{
printf("Hello World!");
}

27 changes: 27 additions & 0 deletions algorithms/final_pattern.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include<iostream>
using namespace std;

int main(){
int n;
cin>>n;
int row = 1;
while(row<=n){
int col = 1;
while(col<=n-row+1){
cout<<col;
col++;
}
int start = (row - 1)*2;
while(start){
cout<<"*";
start--;
}
col = n - row + 1;
while(col >= 1){
cout<<col;
col--;
}
cout<<endl;
row++;
}
}
Binary file added algorithms/final_pattern.exe
Binary file not shown.