Code2flow 094e9

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

int main()

int num[10], index

int option, total, temp

total = 0

printf("Menu\n1. Display greater and smaller numbers.\n2. Display total of all numbers.\n3. Display any even numbers.\n4. Display any odd numbers.\n\nChoose a number :")

scanf_s("%d", &option)

printf("\n")

index = 0

index < 10

False True

printf("\n") printf("Enter integer num[%d] : ", index+1)

option == 2 scanf_s("%d", &num[index])

True False

int count = 0 option == 3 index++

True False

index = 0 option == 4

True

count < 10 index = 0

True False

total = total + num index < 10 False

count True printf("Total of all numbers : %d", total)

count++ (num[index] % 2) == 0 False index < 10

True False True

printf("This is even number that you enter = %d\n", num[index]) False 0 (num[index] % 2) != 0

True

index++ printf("This is odd number that you enter = %d\n", num[index]) False

index++

You might also like