HEXAWARE GD Topics »

____________________________________________________________________________________

1. Everybody jumping into software field - is it good or bad.
2. “EDUCATION AND SUCCESS” DOES IT HAVE A CORRELATION.
3. “Whether impact of western culture on Indian culture is a boon or a bane”.
4. Is internet suitable for Younger’s?
5. IS MBA needed?
6. What Should India do to win a gold medal in the Olympics?
7. Will India need a Dictatorship / Democratic rule now?
8. “Two solutions to improve engineering standard”

2 Response to "HEXAWARE GD Topics »"

  1. Anonymous says:

    It would be Great..............

    Unknown says:

    Marhaba,


    Brilliant article, glad I slogged through the #topic it seems that a whole lot of the details really come back to from my past project.

    I made a basic calculator using this codes. What i want to learn is how to make a loop after the program ask "try again y/n"? it will return to choose an operation.


    Code:
    #include
    #include



    int main(){
    int num1, num2, choice;

    printf("Choose an operation\n\n");
    printf("[1] Add\n[2] Subtract\n[3] Multiply\n[4] Divide\n[5] Exit\n");
    scanf("%d", &choice);

    switch(choice){

    case 1:
    printf("Enter 1st number:\n");
    scanf("%d", &num1);
    printf("Enter 2nd number:\n");
    scanf("%d", &num2);
    printf("\n%d", (num1+num2));
    break;
    case 2:
    printf("Enter 1st number:\n");
    scanf("%d", &num1);
    printf("Enter 2nd number:\n");
    scanf("%d", &num2);
    printf("\n%d ", (num1-num2));
    break;
    case 3:
    printf("Enter 1st number:\n");
    scanf("%d", &num1);
    printf("Enter 2nd number:\n");
    scanf("%d", &num2);
    printf("\n%d", (num1*num2));
    break;
    case 4:
    printf("Enter 1st number:\n");
    scanf("\n%d", &num1);
    printf("Enter 2nd number:\n");
    scanf("%d", &num2);
    printf("\n%d", (num1/num2));
    break;
    case 5:
    return 0;

    default:
    printf("That is not a valid choice.");
    break;
    }
    getch();
    }

    Awesome! Thanks for putting this all in one place. Very useful!


    Thanks a heaps,

Post a Comment

Powered by Blogger