Skip to main content

Posts

Showing posts from 2017

10 Best Smartphone under Rs. 10000

1- Xiaomi Redmi Note 4 Specifications Ram & Storage : 2 & 3 GB | 32 GB Display : 5.5 (1080 x 1920) Processor : 2 GHz,Octa Operating System : Android Primary Camera : 13 MP Front Camera : 5 MP Battery : 4100 mAH Soc : Qualcomm Snapdragon 625 Price- Rs. 9999 2-Xiaomi Redmi 4 Specifications Ram & Storage : 3 GB | 32 GB Display : 5 (720 x 1280) Processor : 1.4 GHz,Octa Operating System : Android Primary Camera : 13 MP Front Camera : 5 MP Battery : 4100 mAH Soc : Qualcomm Snapdragon 435 Price-Rs. 8999 3-YU Yureka Specifications Ram & Storage : 4 GB | 32 GB Display : 5 (1080 x 1920) Processor : 1.4 GHz,Octa Operating System : Android Primary Camera : 13 MP Front Camera : 8 MP Battery : 3000 mAH Soc : Qualcomm Snapdragon 430 Price-Rs. 8999 4- Xiaomi Redmi 4A Specifications Ram & Storage : 2 GB | 16 GB Disp...

Jio Monsoon offer::Take a look at new plans

Again its free... :-)

To find a number is perfect or not:

#include<stdio.h> #include<conio.h> void main() { int n,s=0,i; clrscr(); printf("ENter the number\n"); scanf("%d",&n); for(i=1;i<n;i++) { if((n%i)==0) { printf("Factors of %d=%d\n",n,i); s=i+s; } } if(s==n) printf("Number is perfect\n"); if(s!=n) printf("Number is not perfect\n"); getch(); }

To find a number is palindrome or not:

#include<stdio.h> #include<conio.h> void main() { int n1,n,s=0,a; clrscr(); printf("Enter the number\n"); scanf("%d",&n); n1=n; while(n>0) { a=n%10; n=n/10; s=(10*s)+a; } if(n1==s) printf("Given number is palindrome\n"); else printf("Given number is not palindrome\n"); getch(); }

Multiplication of Matrix:

#include<stdio.h> #include<conio.h> void main() { int a[3][3],b[3][3],c[3][3],j,i,k; clrscr(); printf("Enter a 3*3 matrix\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&a[i][j]); } } printf("Enter a second 3*3 matrix\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&b[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { c[i][j]=0; } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { for(k=0;k<3;k++) { c[i][j]=c[i][j]+a[i][k]*b[k][j]; } } } printf("Matrix multiplication is-\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("%d ",c[i][j]); } printf("\n"); } getch(); }

LCM of two number:

#include<stdio.h> #include<conio.h> void main() { int a,b,i; clrscr(); printf("enter two number\n"); scanf("%d%d",&a,&b); for(i=1;i<=(a*b);i++) { if(i%a==0&&i%b==0) { printf("LCM of two number is : %d",i); break; } } getch(); }

To remove duplicate element from an array:

#include<stdio.h> #include<conio.h> void main() { int i,c=10,j,a[10],d=10; clrscr(); printf("Enter ten numbers\n"); for(i=0;i<10;i++) scanf("%d",&a[i]); for(i=0;i<10;i++) { c: c--; if(a[i]==a[i+1]) { for(j=i;j<10;j++) { a[j]=a[j+1]; } d--; if(c>0) goto c; } } printf("Array after removing duplicate\n"); for(i=0;i<d;i++) printf("%d",a[i]); getch(); }

For Binary search:

#include<stdio.h> #include<conio.h> void main() { int n,i,flag=0,lb=0,ub=8,a[9],mid=0; clrscr(); printf("Enter 9 numbers\n"); for(i=0;i<9;i++) { scanf("%d",&a[i]); } printf("Enter the number to be searched\n"); scanf("%d",&n); mid=(lb+ub)/2; while(lb<=ub) { if(a[mid]==n) { flag=1; break; } else if(n>a[mid]) lb=mid+1; else ub=mid-1; mid=(lb+ub)/2; } if(flag==0) printf("%d is not present\n",n); if(flag==1) printf("%d is present at %d location\n",n,mid+1); getch(); }

To Find a number is present in array or not:

#include<stdio.h> #include<conio.h> void main() { int a[10],i,b,flag=0; clrscr(); printf("Enter ten numbers\n"); for(i=0;i<10;i++) { scanf("%d",&a[i]); } printf("Enter the number to search\n"); scanf("%d",&b); for(i=0;i<=9;i++) { if(a[i]==b) { flag=1; break; } } if(flag==0) printf("%d is not located\n",b); if(flag==1) printf("%d is located in %d location\n",b,i+1); getch(); }

Find total marks by 3 student in 3 subject by structure:

#include<stdio.h> #include<conio.h> struct marks { int sub1; int sub2; int sub3; int total; }; void main() { int i; struct marks student[3]={{45,61,71,0},{61,72,75,0},{51,55,66,0}}; struct marks total; clrscr(); total.sub1=0; total.sub2=0; total.sub3=0; total.total=0; for(i=0;i<=2;i++) { student[i].total=student[i].sub1+student[i].sub2+student[i].sub3; total.sub1=total.sub1+student[i].sub1; total.sub2=total.sub2+student[i].sub2; total.sub3=total.sub3+student[i].sub3; total.total=total.total+student[i].total; } printf("Student total\n"); for(i=0;i<=2;i++) printf("student[%d] %d\n",i+1,student[i].total); printf("Subject total\n"); printf("%s %d\n%s %d\n%s %d\n","subject1",total.sub1,"subject2",total.sub2,"subject3",total.sub3); printf("\nGrand total=%d\n",total.total); getch(); }

Program of ATM machine:

#include<stdio.h> #include<conio.h> void main() { int n,a; clrscr(); printf("Enter any amount from 100 to 10000\n"); scanf("%d",&n); if(n>=2000) { a=n/2000; n=n%2000; printf("Two thousand notes=%d\n",a); } if(n>=1000) { a=n/1000; n=n%1000; printf("Thousand notes=%d\n",a); } if(n>=500) { a=n/500; n=n%500; printf("Five hundred notes=%d\n",a); } if(n>=100) { a=n/100; n=n%100; printf("Hundred notes=%d\n",a); } getch(); }

Insert a number in an array:

#include<stdio.h> #include<conio.h> void main() { int i,loc,n,a[6]; clrscr(); printf("Enter 5 numbers\n"); for(i=0;i<5;i++) scanf("%d",&a[i]); printf("enter the location\n"); scanf("%d",&loc); printf("Enter the number\n"); scanf("%d",&n); for(i=4;i>=loc;i--) a[i+1]=a[i]; a[loc]=n; for(i=0;i<6;i++) printf("%d",a[i]); getch(); }

Delete a number from an array:

#include<stdio.h> #include<conio.h> void main() { int a[6],i,n,j; clrscr(); printf("Enter 6 number in sorted order\n"); for(i=0;i<6;i++) scanf("%d",&a[i]); printf("Enter the number you want to delete\n"); scanf("%d",&n); for(j=0;j<6;j++) { if(n==a[j]) break; } for(i=0;i<6;i++) a[j]=a[j+1]; for(i=0;i<5;i++) printf("%d",a[i]); getch(); }

Addition of matrix

#include<stdio.h> #include<conio.h> void main() { int a[3][3],b[3][3],c[3][3],i,j; clrscr(); printf("Enter a first matrix of order 3*3\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&a[i][j]); } } printf("Enter a second matrix of order 3*3\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&b[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { c[i][j]=a[i][j]+b[i][j]; } } printf("Addition of matrix\n") for(i=0;i<3;i++) for(j=0;j<3;j++) printf("%d",c[i][j]); printf("\n"); getch(); }

String concatenation (To Add two string)

#include<stdio.h> #include<conio.h> void main() { char name1[20],name2[20]; int i,j; clrscr(); printf("Enter first string\n"); scanf("%s",name1); printf("Enter second string\n"); scanf("%s",name2); i=0; while(name1[i]!='\0') i++; for(j=0;name2[j]!='\0';j++) { name1[i]=name2[j]; i++; } name1[i]='\0'; printf("String after concatenation=%s",name1); getch(); }

C programme-Sum of two number

#include<stdio.h> #include<conio.h> Void main() { Int a,b,sum=0; Clrscr(); Printf("Enter two numbers\n"); Scanf("%d%d",&a,&b); Sum=a+b; Printf("Sum of two numbers=%d",sum); getch(); } If you are begginer and u have any question about anything , just comment..i'll try to resolve..

Window 7 In Just 9 MB

Hey,,,Welcome to this post.. Now everyone must be thinking that this must be a spam or a fraud but i promise you it is real and fully working window 7.. This is not done by a magic.. We are living in 20,s century and by the help of technology , everything is possible, so without wasting your time,here is the link. Extract it through Winrar and Your window 7 is ready.. Window 7 in 9 mb