
#include<stdio.h> int main() { int i,n[10],c=0; printf ("Enter a number \n"); for (i=0;i<=9;i++) scanf ("%d",&n[i]); for (i=1;i<=n;i++) { if(n[i]%i==0) c=c+1; } if (c==2) printf ("The number is PRIME&quo...
A blog about programming languages and this Blog specially Create for learning languages like C language,C++ Language, Data Structure and Algorithm.
#include<stdio.h> int main() { int i,n[10],c=0; printf ("Enter a number \n"); for (i=0;i<=9;i++) scanf ("%d",&n[i]); for (i=1;i<=n;i++) { if(n[i]%i==0) c=c+1; } if (c==2) printf ("The number is PRIME&quo...
#include<stdio.h> int main() { int r[20],e,s,a; printf("Enter array size"); scanf("%d",&a); printf("Enter array elements:\n"); for(e=0;e<a;++e) scanf("%d",&r[e]); printf("\nAny number enter to...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include<stdio.h> int main () { int size,b,i; printf("Enter a size of array\n"); scanf("%d",&size); int a[size]; printf("Enter element of the array=%d\n"); for(i=0;i<=a[size];i...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include<stdio.h> main () { int n[20],i,j; printf("Enter any 20 number\n"); for(i=0;i<=19;i++) scanf("%d",&n[i]); printf("value you entered are:\n"); for(j=0;j<=19;j++) printf("%d\n&q...
1 2 3 4 5 6 7 8 9 #include<stdio.h> main() { int i,n[]={10,14,16,81,99,12}; for(i=0;i<6;i++) { printf("Enter elements n[%d]:%d\n",i,n[i]); } } If you face any problem so contact me Thank you Contact :- https://www.facebook.com/Teach.Coding
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #include<stdio.h> #include<conio.h> #include<string.h> struct Student { int stdid; char name[15]; float marks; }; int main() ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #include<stdio.h> #include<conio.h> #include<string.h> struct Emp { int empid; char name[15]; float salary; }; int main() { ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #include<stdio.h> #include<conio.h> #include<string.h> struct Doc { int Docid; char name[15]; float salary; }; int main() { ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 #include<stdio.h> #include<conio.h> #include<string.h> struct Book { int bid; char title[10]; float price; }; void main() { int lo...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<stdio.h> main() { int num,sum,a,b,c,d,d1,d2,d3,d4; printf("Enter any four digits number:"); scanf("%d",&num); a=num/10; d4=num%10; b=a/10; d3=a%10; c=b/10; d2=b%10; d=c/10; d1=c%10; su...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include<stdio.h> main() { int num,sum,a,b,c,d,e,d1,d2,d3,d4,d5; printf("Enter any five digits number:"); scanf("%d",&num); a=num/10; d5=num%10; b=a/10; d4=a%10; c=b/10; d3=b%10; d=c/10; d...
#include<stdio.h> main() { float l,b,r,p,c,A; printf("Enter the lenght of tringle=\n"); scanf("%f",&l); printf("Enter the breath of tringle=\n"); scanf("%f",&b); printf("Enter the radius=\n"); scanf("%f",&r); A=l...