Breaking

April 12, 2019

String conversation





#include<stdio.h>
#include<string.h>
void main()
{
    char name[22],b,c=65,s=97,d,f;
    int i,j;

    printf("Enter a character :");
    scanf("%s",name);

    for(i=0; i<123;i++)
    {   
        d=0;
        f=0;
        f=s;
        d=c;
        for(j=0; j<strlen(name); j++)
        {
            if(name[j]==d)
            {
                name[j]=d+32;       
            }
            else
            {
                if(name[j]==f)
                {
                     name[j]=s-32;
                }
            }
         }
          if(c<97 && s>65)
          {
             c++;
             s++;
          }
   
     }
   for(i=0; i<strlen(name);i++)
   {
       printf("%c",name[i]);
   }
}
   
learn hack swain

April 09, 2019

Write a program to assending order the string



Write a program to assending order the string.

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct a
{
char name[20];
}s[5];
void main()
{
           int i,j,a,b;
           char n[22];

for(i=0; i<5; i++)
{
         printf("Enter a character  :");
         scanf("%s",s[i].name);
}

for(i=0; i<5; i++)
{
       for(j=0; j<4; j++)
       {
              if(strcmp(s[i].name,s[j].name)<-1)
              {
                      strcpy(n,s[i].name);
                      strcpy(s[i].name,s[j].name);
                      strcpy(s[j].name,n);
              }
      }
}

  for(i=0; i<5; i++)
  {
         printf("\nEnte :%s",s[i].name);
   }
}




learn hack swain

January 23, 2019

keywords program in c

keyboard का programs

In the bellow you can also download the programs in  files 

Solutions is here



#include
#include

void main()
{
system("clear");
int i[2000];
char name[1000]="a.txt",c;


printf("\n\n\n Enter a number ");
scanf("%d",&i[1]);


if(i[1]==1)
      printf("\n.\n\n\n");
if(i[1]==11)
      printf(",\n\n\n");
if(i[1]==111)
      printf("?\n\n\n");
if(i[1]==1111)
      printf("!\n\n\n");
if(i[1]==11111)
      printf("\n1\n\n\n");
if(i[1]==2)
      printf("\na\n\n\n");
if(i[1]==22)
      printf("\nb\n\n\n");
if(i[1]==222)
      printf("\nc\n\n\n");
if(i[1]==3)
      printf("\nd\n\n\n");
if(i[1]==33)
      printf("\ne\n\n\n");
if(i[1]==333)
      printf("\nf\n\n\n");
if(i[1]==4)
      printf("\ng\n\n\n");
if(i[1]==44)
      printf("\nh\n\n\n");
if(i[1]==444)
       printf("\ni\n\n\n");
if(i[1]==5)
      printf("\nj\n\n\n");
if(i[1]==55)
      printf("\nk\n\n\n");
if(i[1]==555)
      printf("\nl\n\n\n");
if(i[1]==6)
      printf("\nm\n\n\n");
if(i[1]==66)
      printf("\nn\n\n\n");
if(i[1]==666)
      printf("\no\n\n\n");
if(i[1]==7)
      printf("\np\n\n\n");
if(i[1]==77)
      printf("\nq\n\n\n");
if(i[1]==777)
      printf("\nr\n\n\n");
if(i[1]==7777)
      printf("\ns\n\n\n");
if(i[1]==8)
      printf("\nt\n\n\n");
if(i[1]==88)
      printf("\nu\n\n\n");
if(i[1]==888)
      printf("\nv\n\n\n");
if(i[1]==9)
      printf("\nw\n\n\n");
if(i[1]==99)
      printf("\nx\n\n\n");
if(i[1]==999)
      printf("\ny\n\n\n");
if(i[1]==9999)
      printf("\nz\n\n\n");
}









Download the image.txt file





my hindi article






CLICK HERE TO DOWNLOAD THE PROGRAMS FILE






my hindi article











Name*



Message*













January 20, 2019

Solve the sum


the question is below

The Fibonacci sequence is defined by the recurrence relation:

Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:

F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.

What is the index of the first term in the Fibonacci sequence to contain 1000 digits?







>>>> winner is <<<<

1. Mr.A
January 20, 2019

Solve the sum


The question is below

10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.

Find the sum of the digits in the number 100!
>





 >>>  winner is <<<<



January 18, 2019

Solve the sum



solve the sum


If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.

If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used?








>>>> winner is <<<<


January 18, 2019

Solve the sum


solve the sum



2power(15)  = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 2power(1000) ?









 >>>> winner is <<<<



January 17, 2019

C program



in the bellow you can also seen and download the programs file



the solution is here







#include<stdio.h>
#include<stdlib.h>
void main()
{
system("clear");   //  clear screen
int a[10][10],b[10][10],c[10][10],r1,c1,r2,c2,i,j,k;

    printf("\n Enter a number of first row ");
    scanf("%d",&r1);

    printf("\n Enter a number of first collimn      ");
     scanf("%d",&c1);

printf("\n \n enter a numbe of first matrix \n");

for(i=0; i<r1; i++)
{
       for(j=0; j<c1; j++)
       {
              scanf("%d",&a[i][j]);
       }
}
     printf("Enter a row of second matrix ");
     scanf("%d",&r2);

      printf("Enter a  collinm of second           matrix");
    scanf("%d",&c2);

for(i=0; i<r2; i++)
{
       for(j=0; j<c2; j++)
       {
             scanf("%d",&b[i][j]);
       }
}

system("clear");

printf("\n\n entered a element of first matrix \n\n ");

for(i=0; i<r1; i++)
{
        for(j=0; j<c1; j++)
       {
              printf("\t%d",a[i][j]);
        }
        printf("\n");
}

printf("\n\n ENtered a element of aecond matrix \n\n");

for(i=0; i<r2; i++)
{
        for(j=0; j<c2; j++)
        {
               printf("\t%d",b[i][j]);
        }
printf("\n");
}
printf("\n\n Addition of two matrix\n\n");

for(i=0; i<r1; i++)
{
        for(j=0; j<c1; j++)
        {
               printf("\t%d",a[i][j]+b[i][j]);
        }
       printf("\n");
 }
printf("\n\n Matrix substration \n\n");

for(i=0; i<r1; i++)
{
        For(j=0; j<c1; j++)
         {
              printf("\t%d",a[i][j]-b[i][j]);
         }
         printf("\n");
}
printf("\n\n Multiply of two matrix \n\n");

 for(i=0; i<r1; i++)
{
         for(j=0; j<c1; j++)
         {
               c [i][j]=0;
               for(k=0; k<c1; k++)
               {
                      c[i][j] +=a[i][k]*b[k][j];
                }
         }
}

for(i=0; i<r1; i++)
{
        for(j=0; j<c1; j++)
        {
              printf("\t%d",c[i][j]);
        }
            printf("\n");
}

}



CLICK HERE TO DOWNLOAD THE PROGRAMS FILE





my hindi article








January 17, 2019

C program





In the bellow you can seen and download the file


The solution is here  👇👇 



#include<stdio.h>
#include<stdlib.h>
void main()
{
   system("clear");     // clear screen
      int a[10][10],b[10][10],c[10]                    [10],r1,c1,r2,c2,i,j,k;



    printf("\n Enter a number of first row ");
    scanf("%d",&r1);

    printf("\n Enter a number of first colloumn");
scanf("%d",&c1);

printf("\n \n enter a elements of first matrix \n");

for(i=0; i<r1; i++)
{
       for(j=0; j<c1; j++)
       {
            scanf("%d",&a[i][j]);
       }
}

//   Above is first  matrix elements  


printf("Enter a row of second matrix ");
scanf("%d",&r2);

printf("Enter a  collinm of second matrix");
scanf("%d",&c2);

for(i=0; i<r2; i++)
{
      for(j=0; j<c2; j++)
      {
           scanf("%d",&b[i][j]);
      }
}

system("clear");     // clear screen

printf("\n\n entered a element of first matrix \n\n ");   // element  print

for(i=0; i<r1; i++)
{
      for(j=0; j<c1; j++)
      {
            printf("\t%d",a[i][j]);
      }
printf("\n");
}

printf("\n\n ENtered a element of second matrix \n\n");     //print second matrix

for(i=0; i<r2; i++)
{
       for(j=0; j<c2; j++)
       {
             printf("\t%d",b[i][j]);
       }
printf("\n");
}

printf("\n\n Multiply of two matrix \n\n");
for(i=0; i<r1; i++)
{
        for(j=0; j<c1; j++)
        {
                c[i][j]=0;
               for(k=0; k<c1; k++)
               {
                       c[i][j] +=a[i][k]*b[k][j];
               }
       } 
}

for(i=0; i<r1; i++)
{
       for(j=0; j<c1; j++)
       {
              printf("\t%d",c[i][j]);
       }
      printf("\n");
}





CLICK HERE TO DOWNLOAD THE PROGRAMS FILE





my hindi article










December 30, 2018

how to find middle number between three number



Solutions is here 👇👇


#include<stdio.h>
#include<conio.h>
void main()
{clrscr();
int a,b,c;

printf("enter a number a");
scanf("%d",&a);
printf("enter a number for b");
scanf("%d",&b);
printf("enter a number for c");
scanf("%d",&c);
if(a>b)
{if(a<c)
{
printf(" a is middle ");
}
else
{if(b>c)
{
printf(" b is middle ");
}
else
{
printf(" c is middle ");
}
}
}
else
{
if(b<c)
{
printf(" b is middle ");
}
else
{
if(a>c)
{
printf(" a is middle ");
}
else
{
printf(" c is middle ");
}
}
}
getch();
}




December 30, 2018

palindrome program in c

Solution is here 👇👇


#include<stdio.h>
#include<conio.h>
void main()
{clrscr();
int a,rev=0,b,rem=0;


printf(" enter a number of a ");
scanf("%d",&a);
b=a;
while(b!=0)
{
  rem=b%10;
  rev=rev*10+rem;
  b=b/10;
}
if(a==rev)
{
  printf("%d is pelindrom number",a);
}
else
{
  printf("%d is not a pelindrom number",a);
}

       getch();
       }


December 30, 2018

All C program



Solution is here 👇👇

#include<stdio.h>
#include<conio.h>

void main()
{
  clrscr();

  int rem=0,a,b,rev=0;
printf("enter a number ");
scanf("%d",&a);
b=a;
while(b!=0)
{
  rem=b%10;
  rev=rev+rem*rem*rem;
  b=b/10;

}
if(a==rev)
{
   printf("%d is a amstrong number",a);
}
else
{
  printf("%d is not a amstrong number",a);
}

getch();
}
December 29, 2018

Solve the sum



Question7  

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?









 >>>> winner is <<<<

December 29, 2018

Solve the sum


Question6  



The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.





 >>>> winner is <<<<

December 29, 2018

Solve the sum


Question4  

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
December 29, 2018

Solve the sum


Questions4


A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the product of two 3-digit numbers.






 >>>> winner is <<<<

December 28, 2018

Solve the sum

questions3

The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?






winner is

December 27, 2018

Solve the sum

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.






winner is
December 27, 2018

Solve the sum


questions1

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.






winner is
December 27, 2018

All C program



The solution is here 👇👇

#include<stdio.h>
void main()
{
int i,j;
int a=65;
printf("A");

for(i=2; i<6; i++)
{
      printf("\n");
      a=64;
       for(j=a+i; j<a+i*2; j++)
       {
              printf("%c",j);
       }

}
}





#include

int main()
{
    printf("Hello world!");
    return 0;
}
December 27, 2018

All C program


The solution is here 👇👇



#include<stdio.h>
#include<stdlib.h>
void pin();
void balance();
void withdrow();
void transfer();
void deposite();
int ch;
char name[20];
int pincode,with,che,tra,depo,bal=10000;
int a;
void main()
{
system("clear");
pin();
}
void pin()
{
b:
printf("enter your pin= ");
scanf("%d",&pincode);
system("clear ");
if(pincode==100)
{                            
printf("\n                                                          >>>>> HELLO SIR WELL COME  TO OUR OFFICIAL BANK<<<<<\n\n\n");
printf("\n                                                                                                                     ifs any problem  than tap 5");

printf("\nenter your choice \n");

x:
if(a==1)
system("clear");
printf("\n\n1.. Check your balance");
printf("\n\n2.. Withdrow your balance");
printf("\n\n3.. Transfer your balance");
printf("\n\n4.. Deposite your balance");
printf("\n\nopction is :->");
scanf("%d",&ch);

switch(ch)
{

case 1:
{
system("clear");
balance();
printf(" \n \n do you want to again than tap 1= ");
scanf("%d",&a);
if(a==1)
{
goto x;
}
printf("\n\n");
}break;
case 2:
{
system("clear");
withdrow();
printf(" \n \n do you want to again than tap 1= ");
scanf("%d",&a);
if(a==1)
{
goto x;
}
printf("\n\n");
}break;
case 3:
{
system("clear");
transfer();
printf(" \n \n do you want to again than tap 1= ");
scanf("%d",&a);
if(a==1)
{
goto x;
}
printf("\n\n");
}
case 4:
{
system("clear");
deposite();
printf(" \n \n do you want to again than tap 1= ");
scanf("%d",&a);
if(a==1)
{
goto x;
}
printf("\n\n");
}
case 5:
{
printf("\n\n THANK YOU TO USE OUR SERVECE\n\n\n");
}
}



}
else
{
printf("\nplease enter vaild pincide\n");
goto b;
}
}//    main pin void
void balance()
{
system("clear");
printf("\n \n sir, your balance is %d\n\n",bal);
}
void withdrow()
{
system("clear");
printf("enter a amount to withdrow :->");
scanf("%d",&with);
printf("\n withdrow is sucsess full");
printf("\n\n sir, your curent balance is :-> %d",bal=bal-with);
}
void transfer()
{
system("clear");

printf("\n\nenter a user name :->");
scanf("%s",name);
printf("enter a amount to transfer :->");
scanf(" %d",&tra);
printf("\n the amaount is sucsessfull to transfer Name= (%s) ",name);
printf("\n        Amount= (%d) ",tra);
printf("\n\n sir, your current balance is :-> %d",bal=bal-tra);
}
void deposite()
{
system("clear");
printf("\n enter a amount to deposite :->");
scanf("%d",&depo);
printf("\nsir, deposite is sucsessful the amount is :-> %d",depo);
printf("\n\n sir, your curent balance is :->%d",bal=bal+depo);
}








December 27, 2018

All C pattern



The solution is here  👇👇







#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,k,l;
for(i=0; i<5; i++)
{
           printf("\n");
           printf("*");
         if(i<4)
         {
                for(j=0; j<5; j++)
               {
                         printf(" ");
               }
         }
         else
          {
                 for(j=0; j<5; j++)
                  {
                         printf("*");
                  }
          }
printf("*");
if(i==0)
{
          for(k=0; k<5; k++)
          {
                   printf("*");
          }
}
    else
    {
             for(k=0; k<0; k++)
             {
                      printf(" ");
             }
    }
}
for(i=0; i<1; i++)
{
          for(k=0; k<6; k++)
          {
                     printf("*");
          }
}
for(i=0; i<5; i++)
{
              printf("\n");
            if(i==4)
            {
                     for(j=0; j<6; j++)
                     {
                             printf("*");
                      }
            }
            else
            {
                    for(j=0; j<6; j++)
                     {
                              printf(" ");
                      }
            }
printf("*");
for(j=0; j<5; j++)
{
            printf(" ");
}
printf("*");
}
getch();

December 27, 2018

All C pattern



The  solution is here  👇👇

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
          clrscr();
          char a[10],b[10],k;
          int i,j,l,m,n,o;
          printf(" enter");
          scanf("%s",a);
          printf("\n");
          strcpy(b,a);
          strrev(b);


for(i=0; i<=5; i++)
{
         for(j=5; j>=i; j--)
         {
                 printf("%c",b[j]);
         }
         for(k=0; k<i; k++)
        {
                printf(" ");
        }
         for(n=0; n<i; n++)
        {
                printf(" ");
        }
         for(m=i; m<=5; m++)
       {
                printf("%c",a[m]);
       }
printf("\n");
}
getch();
}

December 27, 2018

All C pattern




The  solution  is  here 👇👇



#include<stdio.h>
void main()
{
int i,j;
for(i=70; i>=65; i--)
{
        for(j=65; j<=i; j++)
        {
                  printf("%c",j);
        }
       for(j=70; j>i; j--)
        {
                   printf("  ");
        }
       for(j=i; j>=65; j--)
       {
                   printf("%c",j);
       }
   printf("\n");
}

Getch() ;

December 27, 2018

All C pattern


The  solution  is here 👇👇


#include<stdio.h>
#include<conio.h>
void main()
{clrscr();
int i,j,k,l,m,n,o,p;


for(i=4; i<=5; i++)
{
          for(j=1; j<i; j++)
          {
                    printf("*");
          }
         for(k=5; k>i; k--)
          {
                   printf(" ");
          }
        for(l=5; l>i; l--)
         {
                   printf(" ");
         }

       for(m=1; m<i; m++)
        {
                   printf("*");
        }
         printf("\n");
 }
//    second loop

for(i=0; i<5; i++)
{
       for(o=1; o<=i; o++)
       {
               printf(" ");
       }
       for(n=4; n>i; n--)
       {
               printf("*");
       }

       for(p=4; p>i; p--)
       {
                printf("*");
       }
      printf("\n");
       }
getch();
}

December 27, 2018

All C program


        The  solution  is  here 👇👇

 #include<stdio.h>
 #include<conio.h>
void main()
{
clrscr();

   int i,a=2,b=3,c=4;
  for(i=1; i<11; i++)
{
     printf("\n");
     printf("%d * %d = %d",a,i,a*i);
      printf("\t %d * %d = %d",b,i,b*i);
      printf("\t %d * %d = %d",c,i,c*i);

}
getch();
}

December 27, 2018

All C pattern


      The  solution is here  👇👇


     #include<stdio.h>
     #include<conio.h>
     void main()
     {clrscr();
     int i,j,k,l,m,n,o,p,q;

 for(i=0; i<5; i++) 
   {
               for(j=0; j<=i; j++)
              {
                     printf("*");
              }
               for(k=4; k>i; k--)
               {
                      printf(" ");
               }
              for(l=4; l>i; l--)
              {
                     printf(" ");
              }

             for(m=0; m<=i; m++)
             {
                     printf("*");
              }

          printf("\n");
   }

//     second loop

 for(i=0; i<5; i++)
  {
           for(n=5; n>i; n--)
          {
                  printf("*");
          }

          for(o=0; o<i; o++)
         {
                  printf("  ");
         }

        for(p=5; p>i; p--)
         {
                  printf("*");

         }

        for(q=0; q<i; q++)
        {
                printf(" ");
        }

         printf("\n");
   
     getch();
     }