Thursday 29 June 2017

ALGEBRA MAGIC

#include
#include

int main()

 int x,y;
 printf("Think of a munber Between 60 and 100 .\nProvided The number should not consist of the values 0&1.\nPress Enter Key When Ready");
 getch();
 printf("\nNow add the number with its reverse.\neg.62+26\nif the number you thought was 62.\npress Enter when ready.");
 getch();
 printf("\nEnter the Middle value of your answer = ");
 scanf("%d",&x);
 y=100+(x*10)+(x-1);
 printf("The value you got is = %d",y);
 getch();
}

Run this and see the magic !!!!!!!

8 comments:

  1. PLEASE INCLUDE HEADER FILES STDIO.H AND CONIO.H

    ReplyDelete
  2. Plz correct the header files

    ReplyDelete
  3. Nice program!!

    please correct these code
    #include


    int main()
    {
    int x,y;
    printf("Think of a munber Between 60 and 100 .\nProvided The number should not consist of the values 0&1.\nPress Enter Key When Ready");
    getchar();
    printf("\nNow add the number with its reverse.\neg.62+26\nif the number you thought was 62.\npress Enter when ready.");
    getchar();
    printf("\nEnter the Middle value of your answer = ");
    scanf("%d",&x);
    y=100+(x*10)+(x-1);
    printf("The value you got is = %d",y);
    getchar();
    return 0;
    }

    ReplyDelete
    Replies
    1. The header files couldn't be uploaded due to some technical errors they are
      #include<_stdio.h_>
      #include<_conio.h_>

      Delete
  4. wont work for certain numbers!
    ex-72,62

    ReplyDelete
    Replies
    1. That is because 62 is included in the example used in the program.

      Delete