zoho easy pattern(vasanth's doubt) 

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int a[10][10]; int n,ct=1; cin>>n; int i,j; for(j=0;j<n;j++) { for(i=0;i<n;i++) { if(i+j<n) { a[i][j]=ct; ct++; } else a[i][j]=0; } } for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(i+j<n) cout<<a[i][j]<<" "; } cout<<endl; } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines