Computer Science, asked by sonu007, 1 year ago

Draw a flow chart to input a natural number, such as 997, and determine whether or not it is a multiple of 3.

Answers

Answered by Sudhalatwal
5
                                       
 
                                                        Start     
                                                           |
                               Take a Natural Number, name it N
                                                           |
                  Add all the digits of the number, name the sum S
                                                          |
                           Divide  S/3 and find the Remainder, Name it R
                                                          |
                                            Check if R = 0
                                         Yes    /           \     No
                                      N is a                   N is not a 
                            multiple of 3                 multiple of 3
                                                  \              /
                                                   \            /
                                                      End
Answered by anildeg
5
If addition of all digit is a multiple of 3 then number is also multiple of 3, otherwise its not.
Example
5497 = 5+4+9+7 = 25 = 2+5 = 7
7 is not a multiple of three so 5497 is not a multiple of 3

6597 = 6+5+9+7 = 27 = 2+7 = 9
9 is multiple of 3 so 6597 is also a multiple of 3.

Flow chart

Take any natural number

Add all digits

Divide by 3

If remainder is 0 then this number is multiple of 3 otherwise its not.
Similar questions