Monday 25 July 2011

[chapter 3 part 1]let us c [SOLVED]


[B] Attempt the following:
(a)Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of an hour.

click here for Answer!!!


(b)Write a program to find the factorial value of any number entered through the keyboard.

click here for Answer!!!


(c)Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.

click here for Answer!!!


(d)Write a program to print all the ASCII values and their equivalent characters using a while loop. The ASCII values vary from 0 to 255.

click here for Answer!!!


(e)Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number. For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 )

click here for Answer!!!


(f)Write a program for a matchstick game being played between the computer and a user. Your program should ensure that the computer always wins. Rules for the game are as follows: ? There are 21 matchsticks. ? The computer asks the player to pick 1, 2, 3, or 4 matchsticks. ? After the person picks, the computer does its picking. ? Whoever is forced to pick up the last matchstick loses the game.
click here for Answer!!!


(g)Write a program to enter the numbers till the user wants and at the end it should display the count of positive, negative and zeros entered.

click here for Answer!!!


(h)Write a program to find the octal equivalent of the entered number.

click here for Answer!!!



(i)Write a program to find the range of a set of numbers. Range is the difference between the smallest and biggest number in the list.

click here for Answer!!!

9 comments:

  1. where can i get pdf file of the let us c solution

    ReplyDelete
  2. main()
    {
    int e=1,op,h;
    while(e<=10)
    {
    printf("\nEnter number of hours an employee has worked:");
    scanf("%d",&h);
    op=(h-40)*12;
    printf("\nOvertime pay is Rs.%d",op);
    e++;
    }
    }

    ReplyDelete
  3. Τhanks for ѕhагing your thoughts about а.
    Rеgards

    My web site iphone repair

    ReplyDelete
  4. I'll right away snatch your rss as I can't іn finԁing your
    e-mail subscriptiοn lіnk or e-newslettеr
    ѕеrѵice. Do you've any? Kindly permit me recognize in order that I may subscribe. Thanks.

    Here is my web site bluehost mail bluehost hosting

    ReplyDelete
  5. #include
    int main()
    {

    int num,temp,count=0,arr[10];
    printf("Enter the number in decimal");
    scanf("%d",&num);
    temp=num;

    while(temp>8)
    {
    arr[count]=temp%8;
    temp=temp/8;
    count++;
    }
    arr[count]=temp;
    while(count>=0)
    {
    printf("%d",arr[count]);
    count--;
    }

    return 0;
    }

    ReplyDelete
  6. /*My thanks in C language*/
    #include
    main()
    {
    int thanks=1;

    printf("\nVery helpful for beginners like me.");
    thanks=thanks*10;
    printf("\n%d X Thanks",thanks);
    printf("\nYours Sincerely : Phani Krishnan");
    }

    ReplyDelete
  7. /*My thanks in C language*/
    #include
    main()
    {
    int thanks=1;

    printf("\nVery helpful for beginners like me.");
    thanks=thanks*10;
    printf("\n%d X Thanks",thanks);
    printf("\nYours Sincerely : Phani Krishnan");
    }

    ReplyDelete