J
jwvai316
What should I do in the condition below?
I have an array called person
person[0].id = 111;
person[0].name = James Smith;
person[1].id = 222;
person[1].name = Paul Smith;
person[2].id = 333;
person[2].name = Billy Smooth;
person[3].id = 444;
person[3].name = Paul Gilbert;
person[4].id = 555;
person[5].name = John Gilbert;
and I want to make search program that takes input:
Input name search: Paul
and it will print
Name ID
---------- ---
Paul Smith 222
Paul Gilbert 444
and if the even if the input is "sm"
the progam will print
Name ID
---------- ---
James Smith 111
Paul Smith 222
BillY Smooth 333
and this search is case insensitive.
Thanks a lot for your answer.
I have an array called person
person[0].id = 111;
person[0].name = James Smith;
person[1].id = 222;
person[1].name = Paul Smith;
person[2].id = 333;
person[2].name = Billy Smooth;
person[3].id = 444;
person[3].name = Paul Gilbert;
person[4].id = 555;
person[5].name = John Gilbert;
and I want to make search program that takes input:
Input name search: Paul
and it will print
Name ID
---------- ---
Paul Smith 222
Paul Gilbert 444
and if the even if the input is "sm"
the progam will print
Name ID
---------- ---
James Smith 111
Paul Smith 222
BillY Smooth 333
and this search is case insensitive.
Thanks a lot for your answer.