0% found this document useful (0 votes)
35 views1 page

Programming in C Assignment No.1 Write Algorithms and Draw Flow Chart To Do The Following

The document provides 9 programming assignments involving algorithms and flowcharts for: 1) Checking if a year is a leap year. 2) Converting seconds to hours, minutes, seconds. 3) Printing numbers not in the Fibonacci series. 4) Calculating the sum of a series up to a user-input number of terms. 5) Drawing a flowchart to print divisors of a number.

Uploaded by

Cyber Security
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Programming in C Assignment No.1 Write Algorithms and Draw Flow Chart To Do The Following

The document provides 9 programming assignments involving algorithms and flowcharts for: 1) Checking if a year is a leap year. 2) Converting seconds to hours, minutes, seconds. 3) Printing numbers not in the Fibonacci series. 4) Calculating the sum of a series up to a user-input number of terms. 5) Drawing a flowchart to print divisors of a number.

Uploaded by

Cyber Security
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Programming in C

Assignment no.1

Write algorithms and draw flow chart to do the following:


1. Check whether a year given by the user is a leap year or not.
2. Given an integer number in seconds as input, print the equivalent time in hours,
minutes, and seconds as output. The recommended output format is something like:
a. 7,322 seconds is equivalent to 2 hours 2 minutes 2 seconds.
3. Print the numbers that do not appear in the Fibonacci series.
4. Print the sum of the following series:

up to n terms where n is given by the user


5. Draw a flowchart to read a number N and print all its divisors.
6. To find the sum of the digits of any given number.
7. To find the sum of N odd numbers.
8. What will be the output of the following program?
int main()
{
int a,b,c;
scanf(“%1d %2d %3d”,&a,&b,&c);
printf(“Sum=%d”,a+b+c);
return 0;
}
[Note: The user input is: 123456 44 544]
9. Write programs to read the values of the variables and print the results
of the computed expressions given below:
(a) a = (b+c)*(b–c)
(b) y = ax2+ bx + c
(c) I=(P*R*T)/100
(d) C = (F–32)/100
(e) A =–(R1/R2+R3)
(f) a =0.5*float1+0.25*integer1 + integer2/0.4 + integer3

You might also like