create an array of Indian city names, all in lower-case strings.
Search cities Bangalore, Mumbai and Delhi from the array and do the following:
Display the reverse of the string, if the city is found.
Display message “City is not Bangalore, Mumbai or Delhi”, if city is not Bangalore, Mumbai or Delhi
For example, if the city found is bangalore, your program should output:
erolagnab
Please do provide the Solution of this task
Let’s take you have a array variable named arr_input with the array of input cities you have
Now use a FOR EACH Activity and pass the above array variable as input and change the type argument as string in for each property panel
Inside the loop use a IF condition like this
item.ToString.ToLower.Equals(“bengaluru”)
If true it goes to THEN block where mention the message box activity with input string like this
New String(item.ToString.ToCharArray.Reverse().ToArray())
If false it goes to ELSE Block where use a ASSIGN ACTIVITY LIKE THIS
bool_nobengaluru = True
Where bool_nobengaluru is a boolean type variable
Inside the same loop next to above if condition use another two if condition and have the same expression in then block and appropriate Boolean variables in else block named bool_nodelhi, bool_nomumbai
Now atlast inside the loop use a IF condition like this
bool_nobengaluru AND bool_nodelhi AND bool_nomumbai
If true it goes to THEN block where use a message box activity with string like this
“City is not Bengaluru or Mumbai or Delhi”