foo.cpp: In function 'int main()':
foo.cpp:10:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (s[2]='5')
^
foo.cpp:17:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (s[1]='8') cout<<"500";
^
foo.cpp:18:30: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
else if (s[1]='1')
^
foo.cpp:36:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (s[1]='8')
^
foo.cpp:42:19: error: 'system' was not declared in this scope
system("pause");
^