if ((lowercase(list[i].date).find(key1) < size(list[i].date) || lowercase(list[i
ID: 3700204 • Letter: I
Question
if ((lowercase(list[i].date).find(key1) < size(list[i].date)
|| lowercase(list[i].name).find(key1) < size(list[i].name)
|| lowercase(list[i].address).find(key1) < size(list[i].address)
|| lowercase(list[i].ill).find(key1) < size(list[i].ill)
|| lowercase(list[i].ic).find(key1) < size(list[i].ic)
|| lowercase(list[i].doctor).find(key1) < size(list[i].doctor)
|| lowercase(list[i].charge).find(key1) < size(list[i].charge)))
{
totalrevenue += stoi(list[i].charge);
display(list, i);
How this code able to find keyword?
Explanation / Answer
if we take first line only.
lowercase(list[i].date).find(key1) < size(list[i].date)
here lowercase(list[i].date).find(key1) -> key1 variable having some value inside. So that perticular string will check in date. if date is less than the size of date of i it will be pass.
same way in other parts also it will work.
if any one of it will pass no need to check next. and it will entern in condition.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.