Skip to content

CoreTask#1: BeanArray - Submit Your Code in Comment Section #26

@ErSKS

Description

@ErSKS

CoreTask#1: BeanArray - An array is defined to be a Bean array if it meets the following conditions a. If it contains a 9 then it also contains a 13. b. If it contains a 7 then it does not contain a 16. So {1, 2, 3, 9, 6, 13} and {3, 4, 6, 7, 13, 15}, {1, 2, 3, 4, 10, 11, 12} and {3, 6, 9, 5, 7, 13, 6, 17} are Bean arrays. The following arrays are not Bean arrays: a. { 9, 6, 18} (contains a 9 but no 13) b. {4, 7, 16} (contains both a 7 and a 16) Write a function named isBean that returns 1 if its array argument is a Bean array, otherwise it returns 0. Function signature is int isBean (int[ ] a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions