PYRAMID PROBLEM IN C PROGRAMMING LANGUAGE WITH OUTPUT SCREEN SHOT

#include int main() { int i,j,n; printf(“Enter lines : “); scanf(“%d”,&n); for(i=1; i<=n; i++) /*This used for printing row only*/ { for(j=1; j<=i; j++)/*This used for printing ASTERISK IE.* only*/ { printf(“* “); } printf(“n”); } return 0; } OUTPUT:  

DAY OF WEEK FROM GIVEN DATE

#includeint main(){ int d,m,y,j,f,h,fh,day; printf(“Enter date(dd/mm/yyyy): “); scanf(“%d/%d/%d”,&d,&m,&y); j=d; switch(m-1) { case 11:   j+=30; /*Fall thru in all cases*/ case 10:   j+=31; case 9:    j+=30; case 8:    j+=31; case 7:    j+=31; case 6:    j+=30; case 5:    j+=31; case 4:    j+=30; case 3:    j+=31; case 2:   …

Read more

Find difference of two dates in given years

#include int main( ) { int d1,d2,d,m1,m2,m,y1,y2,y; printf(“Enter first value of date(dd/mm/yyyy): “); scanf(“%d/%d/%d”,&d1,&m1,&y1); printf(“Enter second date(dd/mm/yyyy): “); scanf(“%d/%d/%d”,&d2,&m2,&y2); if(d2 { if(m2==3) { if(y2%100!=0 && y2%4==0  ||  y2%400==0) /*check for leap year*/ d2=d2+29; else d2=d2+28; } else if(m2==5 || m2==7 || m2==10 || m2==12) d2=d2+30; else d2=d2+31; m2=m2-1; } if(m2 { y2=y2-1; m2=m2+12; } y=y2-y1; …

Read more

Swap two Number Without using third Variable or number

#include int main(){ int a,b;printf(“please enter first number:”);scanf(“%d”,&a);printf(“please enter Second number:”);scanf(“%d”,&b);printf(“nn”);printf(“Number before swapping:n”);printf(“a=%dn”,a);printf(“b=%dn”,b);//swap numbera=a+b;b=a-b;a=a-b;printf(“nn”);//used for new lineprintf(“Number after swapping:n”);printf(“First Number a=%dn”,a);printf(“Second Number b=%dn”,b);printf(“nn”);       return 0;    }

pocket mobile phone jammer

pocket mobile phone jammer is launched     this device is used yo jam the signal of mobile within a certain range .   features are as follws:   POCKET. , PORTABL & RECHARGEABLE MOBILE PHONE JAMMER AT LOWEST PRICE Features Precision. and reliable, accurate work #Compact and portable, easy to carry #Easy to ope.rate …

Read more

prime number problem in c programming

#include<stdio.h> int main(){ int n, i = 3, count, c;  printf(“Enter the number of prime numbers requiredn”); scanf(“%d”,&n);  if ( n >= 1 ) { printf(“First %d prime numbers are :n”,n); printf(“2n”); }  for ( count = 2 ; count <= n ; ) { for ( c = 2 ; c <= i – 1 …

Read more

REVERSE A NUMBER IN C LANGUAGE

#include <stdio.h>   int main() { int n, reverse = 0;   printf(“Enter a number to reversen”); scanf(“%d”,&n);   while (n != 0) { reverse = reverse * 10; reverse = reverse + n%10; n = n/10; }   printf(“Reverse of entered number is = %dn”, reverse);   return 0; }

LCM & HCF

#include <stdio.h> int main() { int a, b, x, y, t, gcd, lcm;  printf(“Enter two integersn”); scanf(“%d%d”, &x, &y);  a = x; b = y;  while (b != 0) { t = b; b = a % b; a = t; }  gcd = a; lcm = (x*y)/gcd;  return 0;}