|
IGNOU > IGNOU Assignments > BCA > BCA 2006 Assignments > Introduction to System Software IGNOU BCA Assignments Question 1: Write an algorithm and draw a corresponding flow chart to convert a decimal number to its hexadecimal equivalent. Ans: Step 1: Take a input of decimal number. Step 2: Now for converting decimal no into hexadecimal no. we start loop for process Step 3: Loop start from no. and go at the 0. Step 4: Now find the remand by mod no by 10. Step 5: Now check the remainder when remainder will be less then 10 that will be stored as it is. Step 6: When remainder will be greater than equal to 10 that will be stored as alphabets as- 10 – A Step 7: Now short the number by divide 10. Step 8: Repeat the step-4 through step-7 until number will be 0. Step 9: After that print the hexadecimal no. Step 10: Stop run. Flow chart
|
|||||||||||||||||||