Search Results
61 items found for ""
- Array Deletion At End
#include void main() { int a[100],i; int eb,size,pos; printf("\nEnter the size of array : "); scanf("%d",&size); for(i=0;i
- Array Deletion At Beginning
#include void main() { int a[100],i; int eb,size,pos; printf("\nEnter the size of array : "); scanf("%d",&size); for(i=0;i
- Array Insertion At Any Position
#include void main() { int a[100],i; int eb,size,pos; printf("\nEnter the size of array : "); scanf("%d",&size); for(i=0;i=pos-1;i--) { a[i+1]=a[i]; } a[pos-1]=eb; size++; printf("\n----Latest Array----\n"); for(i=0;i
- Array Insertion At End
#include void main() { int a[100],i; int eb,size; printf("\nEnter the size of array : "); scanf("%d",&size); for(i=0;i
- Array Insertion At Beginning
#include void main() { int a[100],i; int eb, size; printf("\nEnter the size of array : "); scanf("%d",&size); for(i=0;i=0;i--) { a[i+1]=a[i]; } a[0]=eb; size++; printf("\n----Latest Array----\n"); for(i=0;i
- Minimum & Maximum Element In Matrix
#include void main() { int a[100][100]; int r, c; int i, j; int max; int min; printf("\nEnter rows : "); scanf("%d", &r); printf("\nEnter columns : "); scanf("%d", &c); for(i=0;ia[i][j]) { min=a[i][j]; } } } printf("\n Minimum : %d", min); }
- Rotate n x n Matrix
#include void main() { int m[100][100]; int i, j, s; printf("\nEnter square matrix size : "); scanf("%d", &s); for(j=0;j=0;j--) { printf(" %d",m[j][i]); } printf("\n"); } printf("\n----Matrix After 90 Degree Anti-clockwise Rotation----\n\n"); for(i=s-1;i>=0;i--) { for(j=0;j=0;i--) { for(j=s-1;j>=0;j--) { printf(" %d ",m[i][j]); } printf("\n"); } }
- User Input 2 x 2 Matrix Rotation
#include void main() { int m[2][2]; int i, j; for(i=0;i<2;i++) { for(j=0;j<2;j++) { printf("\nEnter element : "); scanf("%d",&m[i][j]); } } printf("\n----Current Matrix----\n\n"); for(i=0;i<2;i++) { for(j=0;j<2;j++) { printf(" %d",m[i][j]); } printf("\n"); } printf("\n----Matrix After 90 Degree Clockwise Rotation----\n\n"); for(i=0;i<2;i++) { for(j=1;j>=0;j--) { printf(" %d",m[j][i]); } printf("\n"); } printf("\n----Matrix After 90 Degree Anti-clockwise Rotation----\n\n"); for(i=1;i>=0;i--) { for(j=0;j<2;j++) { printf(" %d",m[j][i]); } printf("\n"); } printf("\n----Matrix After 180 Degree Rotation----\n\n"); for(i=1;i>=0;i--) { for(j=1;j>=0;j--) { printf(" %d ",m[i][j]); } printf("\n"); } }
- 2 x 2 Matrix Rotation
#include void main() { int m[2][2]={ {2,1}, {3,7} }; int i,j; printf("\n----Current Matrix----\n\n"); for(i=0;i<2;i++) { for(j=0;j<2;j++) { printf(" %d ",m[i][j]); } printf("\n"); } printf("\n----Matrix After 90 Degree Clockwise Rotation----\n\n"); for(i=0;i<2;i++) { for(j=1;j>=0;j--) { printf(" %d ",m[j][i]); } printf("\n"); } printf("\n----Matrix After 90 Degree Anti-clockwise Rotation----\n\n"); for(i=1;i>=0;i--) { for(j=0;j<2;j++) { printf(" %d ",m[j][i]); } printf("\n"); } printf("\n----Matrix After 180 Degree Rotation----\n\n"); for(i=1;i>=0;i--) { for(j=1;j>=0;j--) { printf(" %d ",m[i][j]); } printf("\n"); } }
- Math Tables
#include void main() { int table, range, tc; printf("\nEnter table name : "); scanf("%d",&table); printf("\nEnter table range : "); scanf("%d",&range); printf("\n----Table of %d----",table); for(tc=1;tc<=range;tc++) { printf("\n%d x %d = %d",table,tc,table*tc); } }
- Guess The Number
#include void main() { int gc=3; int gn,sn; int score=0; printf("\nEnter secret number : "); scanf("%d",&sn); while(gc>0) { printf("\nEnter guess number : "); scanf("%d",&gn); if(gn==sn) { if(gc==3) { score=20; printf("\n---- You score first division ----"); break; } else if(gc==2) { score=10; printf("\n---- You score second division ----"); break; } else if(gc==1) { score=5; printf("\n---- You score third division ----"); break; } } else { if(gnsn) { printf("\nYour guess is to high !!"); //break; } } gc--; } printf("\nYour score : %d",score); }
- Windows Short Tricks Part 2
Windows Shortcut Keys 1. MINIMIZE ALL THE OPEN TABS WINDOWS + M OR D 2. VIRTUAL DESKTOP WINDOWS + CTRL + D 3. OPEN TASKBAR APPS WINDOWS + LOCATION( START FROM 0) 4. SWITCH TABS ALT + TAB 5. OPEN FILE MANAGER WINDOWS + E 5. LOCK SCREEN WINDOWS + F 5. CAST WINDOWS + K 5. PROJECT WINDOWS + P 5. RUN WINDOW WINDOWS + R 5. SEARCH BAR WINDOWS + S