Skip to content

i dint get the code #4

@yashshringare

Description

@yashshringare
char[] arr = input.toCharArray();

char Operator = arr[1];
double num1 = (double)(arr[0]-'0');
double num2 = (double)(arr[2]-'0');

why do we use -'0' in the above code can you please explain

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