foo.cc:2:7: error: expected nested-name-specifier before ‘namepace’
2 | using namepace std;
| ^~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:7:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
7 | cin>>vip;
| ^~~
| std::cin
In file included from stdc++.h:146:
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iostream:62:18: note: ‘std::cin’ declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
foo.cc:11:22: error: ‘P’ was not declared in this scope
11 | case P:jg=jg*0.7;break;
| ^
foo.cc:12:22: error: ‘G’ was not declared in this scope
12 | case G:jg=jg*0.8;break;
| ^
foo.cc:13:22: error: ‘S’ was not declared in this scope
13 | case S:jg=jg*0.9;break;
| ^
foo.cc:16:9: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
16 | cout<<jg;
| ^~~~
| std::cout
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iostream:63:18: note: ‘std::cout’ declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~