3. C PROGRAMMING
Display: How
obedient you are
Code:
Output:
Flowchart
Writeaprogramtotakeanumberlessthan10.
Start
Take input
n
n<10
?
Display:
How stupid!!!
End
Yes No
6. C PROGRAMMING
Display: Roots are
Complex!!!
Display: Roots
are= Root1, Root2
Display: Roots
are Equal= Root1
Flowchart
Start
Calculation
d = (b*b) – (4*a*c)
Take values for
a, b, c
d < 0
?
Yes No
d = 0
?
Yes No
Calculation
t=sqrt(d)
Root1= (-b+t)/2*a
Root2= (-b-t)/2*a
Calculation
Root1= -b/2*a
End
8. C PROGRAMMING
Flowchart
Start
Take input
a
a %
100==
0?
Yes No
a %
400==
0?
Yes No a %
4==0?
Yes No
Display: The
yearis LeapYear
Display:The year
isnot Leap Year
Display: The
yearis LeapYear
Display:The year
isnot Leap Year
End