Showing posts with the label while loop programsShow all

13) Write a program to calculate and print the first m Fibonacci numbers using Do-While loop.

The numbers in the sequence 1           1           2           3           5           8           13         21         …………………….. are called Fibonacci numbers. After the first two numbers in the series, each number is the sum of the two preceding numbers. source file name:  Fibnums.C #include<stdio.h&…

Read more

8) Write a program to calculate overtime pay of 03 employees.

Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 120.00 per hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of an hour. source file name:  empot.C void main() { int twh,oth; int emp; int otamt; clrscr(); emp=1; while(emp&l…

Read more