Saturday, 23 July 2011

[chapter 1]let us c [SOLVED]


[H]write C programs for the following:

(a)Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

click here for Answer!!!


(b)The distance between two cities (in km.) is input through the keyboard. Write a program to convert and print this distance in meters, feet, inches and centimeters.

click here for Answer!!!


(c) If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggregate marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

click here for Answer!!!


(d)Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees.

click here for Answer!!!


(e) The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle.

click here for Answer!!!


(f) Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.
click here for Answer!!!


(g) If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.
(Hint: Use the modulus operator ‘%’)


click here for Answer!!!


(h) If a five-digit number is input through the keyboard, write a program to reverse the number.

click here for Answer!!!


(i) If a four-digit number is input through the keyboard, write a program to obtain the sum of the first and last digit of this number.

click here for Answer!!!


(k) A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard in hundreds, find the total number of currency notes of each denomination the cashier will have to give to the withdrawer.

click here for Answer!!!


(l) If the total selling price of 15 items and the total profit earned on them is input through the keyboard, write a program to find the cost price of one item.

click here for Answer!!!


(m) If a five-digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23402.

click here for Answer!!!

16 comments:

  1. why have you used gs=bs*(16.0/10.0);in the solution of the first question?

    ReplyDelete
  2. sir j question no answer

    ReplyDelete
  3. #include
    int main()
    {
    float bsc_salary;
    float dearness_allownes;
    float house_rent;
    float gross;
    printf("enter the basic sallary\n");
    scanf("%f",&bsc_salary);
    dearness_allownes=(40*(bsc_salary/100));
    house_rent=(20*(bsc_salary/100));
    gross=(bsc_salary+dearness_allownes+house_rent);
    printf("gross salary is %f\n",gross);
    return 0;
    }

    ReplyDelete
    Replies
    1. then draw a flowchart for this program

      Delete
  4. write program that takesa sentence as an input from the file,file name taken input from user then sorts the sentence and output on other file coding

    ReplyDelete
  5. where i can get a flowchart

    ReplyDelete
  6. This will help you to alter the quantity of blur easily and allow
    camera make other critical decisions when you are shooting.
    However, if you face a data loss situation, in absence of a valid backup,
    no need to worry. It is owner by Matt Furer who has been fixing cameras
    for 22 years.

    My web site - d7100

    ReplyDelete
  7. It is also enabled with 4G LTE, 3G HSPA and NFC Connectivity.
    Another deal offering LCD as gift item covers a tariff offering.

    Then it was dragged by a string and the results are there in front of
    you.

    Feel free to surf to my weblog: samsung s4

    ReplyDelete
  8. Only use your AC or Heater if it is absolutely necessary.
    I found the car at a truck dealership for $7000 dollars.

    Look for bargains, when buying expensive things that you need.


    My webpage - nest learning thermostat

    ReplyDelete
  9. Is it an advantage or disadvantage to save everything on the web.
    If you are using a DSL modem, are tethering through
    a cell phone, or are still on dial-up, you probably have a static IP address, and
    will actually have to enter in information to this device to
    get connected to the Internet. Properly, it has every
    little thing to try and do with on the web storage.

    My web-site; samsung chromebook review

    ReplyDelete
  10. Decide what you want in terms of features, processing power, memory and hard drive capacity,
    never forgetting graphics cards, size and quality of display and the weight and battery life.
    It has all the extra features that the i - Pad has too, just fewer apps because it's fairly new compared to the i - Pad. Apple products include the Iphones, Ipads and Ipods all at competitive prices.

    Here is my web blog :: playbook review

    ReplyDelete
  11. But certainly it's also not the easiest place in the body and to clear up acne killer. As a result of the caramelization process. Listening to average folks used to be a cure-all. By the time she was on Napoleon's list as a starting point for many people, both inside and out.
    Some forms of birth control pills.

    Here is my web page the acne killer

    ReplyDelete
  12. I have solved almost all the problems of the book. Come to my blog for solutions. http://www.letuscalllessons.blogspot.in/

    ReplyDelete
  13. thanxxxxx alot

    ReplyDelete