Computer Science, asked by kanugulanavya1527, 5 months ago

John has n sweets which are to be distributed equally to m kids. Design the flowchart such that it also prints number of sweets each kid gets and the remaining sweets with John

Answers

Answered by nidaeamann
3

Explanation:

There are many languages in which the program or the flowchart can be written. The below program is written in C language, a commonly used language

Program

void main () :

bool done = false

int n;  // n is the number of sweets

int m;   //m is the number of kids

int s

int r

s = n / m

r = n % m

print( "Number of sweets per kid is %i" ,s )

print( "Number of sweets left with John is %i" ,r )

return

Answered by DevilHunter001
0

Answer:

Explanation:

There are many languages in which the program or the flowchart can be written. The below program is written in C language, a commonly used language

Program

void main () :

bool done = false

int n;  // n is the number of sweets

int m;   //m is the number of kids

int s

int r

s = n / m

r = n % m

print( "Number of sweets per kid is %i" ,s )

print( "Number of sweets left with John is %i" ,r )

return

Similar questions