submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s058842847 | p03852 | C++ | using namespace std;
int main()
{
char c;
cin >> c;
if(c == 'a' || c == 'i' || c== 'u' || c == 'e' || c == 'o')
cout << "vowel";
else
cout << "consonant";
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin >> c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:8:1: error: 'cout' was not declared in this scope
8 | cout << "vowel";
| ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:1: error: 'cout' was not declared in this scope
10 | cout << "consonant";
| ^~~~
a.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s389375105 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char c;
cin >> c;
if(c == 'a' || c == 'i' || c== 'u' || c == 'e' || c == 'o')
cout << "vowel";
else if
cout << "consonant";
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: expected '(' before 'cout'
12 | cout << "consonant";
| ^~~~
| (
|
s673220455 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if((c == 'a')||(c == 'o')||(c == 'i')||(c == 'u')||(c == 'e')||(c == 'o')){
cout << vowel << endl;
}else{
cout << consonaut << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'vowel' was not declared in this scope
9 | cout << vowel << endl;
| ^~~~~
a.cc:11:13: error: 'consonaut' was not declared in this scope
11 | cout << consonaut << endl;
| ^~~~~~~~~
|
s660215621 | p03852 | C++ | #include<iostream>
using namespace std;
int main(){
char a;
cin>>a;
if(a=='a' || a=='e' || a=='i' || a=='o' || a=='u')cout<<"vowel";
else cout<<"consonant"
return 0;
} | a.cc: In function 'int main()':
a.cc:7:27: error: expected ';' before 'return'
7 | else cout<<"consonant"
| ^
| ;
8 | return 0;
| ~~~~~~
|
s297686713 | p03852 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String c = sc.next();
String[] vowel = {"a", "i" , "u" , "e" , "o"};
for(String a : vowel){
if(c.equals(a)){
System.out.pritnln("vowel");
return;
}
}
System.out.println("consonant");
}
}
| Main.java:14: error: cannot find symbol
System.out.pritnln("vowel");
^
symbol: method pritnln(String)
location: variable out of type PrintStream
1 error
|
s321110316 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
char c;
cin >> c;
if (str.at(0) != 'a' && str.at(0) != 'e' && str.at(0) != 'i'
&& str.at(0) != 'o' && str.at(0) != 'u') cout << "consonant" << endl;
else cout << "vowel" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: 'str' was not declared in this scope; did you mean 'std'?
7 | if (str.at(0) != 'a' && str.at(0) != 'e' && str.at(0) != 'i'
| ^~~
| std
|
s437309883 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
char c;
cin >> c;
if (str.at(0) != 'a' && str.at(0) != 'e' && str.at(0) != 'i'
&& str.at(0) != 'o' && str.at(0) != 'u') cout << "consonant" << endl;
else cout << vowel << endl;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'str' was not declared in this scope; did you mean 'std'?
7 | if (str.at(0) != 'a' && str.at(0) != 'e' && str.at(0) != 'i'
| ^~~
| std
a.cc:9:16: error: 'vowel' was not declared in this scope
9 | else cout << vowel << endl;
| ^~~~~
|
s903875148 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin>>c;
for(int i=0;i<5;i++){
if("aeiou"s.at(i)==c){
cout<<"vowel"<<endl;
break;
}
}
if("aeiou"s.at(i)!=c){
cout<<"constant"<<endl;
} | a.cc: In function 'int main()':
a.cc:13:18: error: 'i' was not declared in this scope
13 | if("aeiou"s.at(i)!=c){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s769426137 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin>>c;
if(a=='a'||'e'||'i'||'o'||'u'){
cout<<"vowel"<<endl;
}
else{
cout<<"consonant"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:6: error: 'a' was not declared in this scope
7 | if(a=='a'||'e'||'i'||'o'||'u'){
| ^
|
s590364019 | p03852 | C++ | #include <cstdio>
#include <cstring>
int main()
{
char a;
a = getchar();
if (a == 'a' || a == 'e' || a =='i' || a == 'o'|| a == 'u')
{
printf("vowel\n");
}
else
{
printf("consonantconsonant\n")
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:47: error: expected ';' before '}' token
14 | printf("consonantconsonant\n")
| ^
| ;
15 | }
| ~
|
s322861148 | p03852 | C | #include<stdio.h>
int main(){
char str;
scanf("%c",&str);
swich(str){
case ('a'):printf("vowel");
case ('i'):printf("vowel");
case ('u'):printf("vowel");
case ('e'):printf("vowel");
case ('o'):printf("vowel");
default:printf("consonant");
}
return 0;
} | main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'swich' [-Wimplicit-function-declaration]
5 | swich(str){
| ^~~~~
main.c:5:13: error: expected ';' before '{' token
5 | swich(str){
| ^
| ;
|
s867243528 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char = c;
cin>>c;
if(c=='a' || (c=='e' || (c=='i' || (c=='o' || c=='u')))){
cout<<vowel<<endl;
}else{
cout<<constant<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before '=' token
5 | char = c;
| ^
a.cc:6:8: error: 'c' was not declared in this scope
6 | cin>>c;
| ^
a.cc:8:11: error: 'vowel' was not declared in this scope
8 | cout<<vowel<<endl;
| ^~~~~
a.cc:10:11: error: 'constant' was not declared in this scope; did you mean 'const'?
10 | cout<<constant<<endl;
| ^~~~~~~~
| const
|
s171490959 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char = c;
cin>>c;
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){
cout<<vowel<<endl;
}else{
cout<<constant<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before '=' token
5 | char = c;
| ^
a.cc:6:8: error: 'c' was not declared in this scope
6 | cin>>c;
| ^
a.cc:8:11: error: 'vowel' was not declared in this scope
8 | cout<<vowel<<endl;
| ^~~~~
a.cc:10:11: error: 'constant' was not declared in this scope; did you mean 'const'?
10 | cout<<constant<<endl;
| ^~~~~~~~
| const
|
s999423657 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int one,m;
char S;
cin >> S;
if (S=='a')
cout << "vowel" << endl;
else if (S=='i')
cout << "vowel" << endl;
else if (S=='u')
cout << "vowel" << endl;
else if (S=='e')
cout << "vowel" << endl;
else if (S=='o')
cout << "vowel" << endl;
else
cout << "consonant" << endl;
}
}
| a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s369977869 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c == a){
cout << "vowel" << endl;
}
else if(c == i){
cout << "vowel" << endl;
}
else if(c == u){
cout << "vowel" << endl;
}
else if(c == e){
cout << "vowel" << endl;
}
else if(c == o){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:11: error: 'a' was not declared in this scope
8 | if(c == a){
| ^
a.cc:11:16: error: 'i' was not declared in this scope
11 | else if(c == i){
| ^
a.cc:14:16: error: 'u' was not declared in this scope
14 | else if(c == u){
| ^
a.cc:17:16: error: 'e' was not declared in this scope
17 | else if(c == e){
| ^
a.cc:20:16: error: 'o' was not declared in this scope
20 | else if(c == o){
| ^
|
s441903518 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
string s;
cin>>s;
if((s=="a")||(s=="o")||(s=="u")||(s="e")||(s=="i")) cout << ("vowel");
else cout<< ("consonante");
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: no match for 'operator||' (operand types are 'bool' and 'std::__cxx11::basic_string<char>')
9 | if((s=="a")||(s=="o")||(s=="u")||(s="e")||(s=="i")) cout << ("vowel");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
| | |
| bool std::__cxx11::basic_string<char>
a.cc:9:36: note: candidate: 'operator||(bool, bool)' (built-in)
9 | if((s=="a")||(s=="o")||(s=="u")||(s="e")||(s=="i")) cout << ("vowel");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:9:36: note: no known conversion for argument 2 from 'std::__cxx11::basic_string<char>' to 'bool'
|
s249254161 | p03852 | C++ | #include<iostream>
using namespace std;
int main(){
char s;
cin >> s;
if(s == a || s == i || s == u || s == e || s == o){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:11: error: 'a' was not declared in this scope
7 | if(s == a || s == i || s == u || s == e || s == o){
| ^
a.cc:7:21: error: 'i' was not declared in this scope
7 | if(s == a || s == i || s == u || s == e || s == o){
| ^
a.cc:7:31: error: 'u' was not declared in this scope
7 | if(s == a || s == i || s == u || s == e || s == o){
| ^
a.cc:7:41: error: 'e' was not declared in this scope
7 | if(s == a || s == i || s == u || s == e || s == o){
| ^
a.cc:7:51: error: 'o' was not declared in this scope
7 | if(s == a || s == i || s == u || s == e || s == o){
| ^
|
s204228076 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string c;
cin >> c;
// ここにプログラムを追記
if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:9:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
9 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_id |
s726320987 | p03852 | C++ | #include<stdio.h>
#include<math.h>
#include<limits.h>
#include<assert.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<string.h>
#include<unistd.h>
#include<stdlib.h>
#include<ctype.h>
#include<time.h>
int main(){
char c;
scanf("%c",c); c=tolower(c);
if(c=='a'||c=='e'||c=='i'|| c=='o'|| c=='u')?
printf("vowel");
else printf("consonant");
return 0;} | a.cc: In function 'int main()':
a.cc:16:45: error: expected primary-expression before '?' token
16 | if(c=='a'||c=='e'||c=='i'|| c=='o'|| c=='u')?
| ^
a.cc:17:20: error: expected ':' before ';' token
17 | printf("vowel");
| ^
| :
a.cc:17:20: error: expected primary-expression before ';' token
|
s915335166 | p03852 | C++ | #include<stdio.h>
#include<math.h>
int main(){
char c;
scanf("%c",c);
c=tolower(c);
printf((c=='a'||c=='e'||c=='i'|| c=='o'|| c=='u')?"vowel":"consonant");
return 0;} | a.cc: In function 'int main()':
a.cc:7:3: error: 'tolower' was not declared in this scope; did you mean 'totalorder'?
7 | c=tolower(c);
| ^~~~~~~
| totalorder
|
s847732855 | p03852 | C++ | #include<stdio.h>
#include<math.h>
#include<limits.h>
#include<assert.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<string.h>
#include<unistd.h>
#include<stdlib.h>
#include<cstdio.h>
#include<cstdlib.h>
#include<ctype.h>
#include<time.h>
int main(){
char c;
scanf("%c",c);
c=tolower(c);
printf((c=='a'||c=='e'||c=='i'|| c=='o'|| c=='u')?"vowel":"consonant");
return 0;} | a.cc:11:9: fatal error: cstdio.h: No such file or directory
11 | #include<cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s137820643 | p03852 | C++ | #include<stdio.h>
#include<math.h>
#include<limits.h>
#include<assert.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<string.h>
#include<unistd.h>
#include<stdlib.h>
#include<cstdio.h>
#include<cstdlib.h>
#include<ctype.h>
#include<time.h>
int main(){
char c;
scanf("%c",c);
printf((c=='a'||c=='e'||c=='i'|| c=='o'|| c=='u'||c=='A'||c=='E'||c=='O'||c=='I'||c=='U')?"vowel":"consonant"); | a.cc:11:9: fatal error: cstdio.h: No such file or directory
11 | #include<cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s858492620 | p03852 | C++ | #include<iostream>
using namespace std;
int main(){
char c ;
cin >> c ;
if(c == 'a' || c == 'e' || c== 'i' || c == 'u' || c== 'o' )
cout << "vowel "<< endl ;
else
cout << "consonant " << endl ;
return 0;
| a.cc: In function 'int main()':
a.cc:10:10: error: expected '}' at end of input
10 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s528763701 | p03852 | C++ | #include<iostream>
using namespace std;
int main(){
char c ;
cin >> c ;
if(c = 'a' || c = 'e' || c= 'i' || c = 'u' || c= 'o' )
cout << " vowel "<< endl ;
else
cout << "consonant " << endl ;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:44: error: lvalue required as left operand of assignment
6 | if(c = 'a' || c = 'e' || c= 'i' || c = 'u' || c= 'o' )
| ~~~~^~~~
|
s015422650 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string str = "Hello";
char c ;
cin >> c ;
if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
cout << "vowel" << endl;
}else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
| ~~^~~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
| ~^~~~~
a.cc:11:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
| ~^~~~~~
a.cc:11:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
| ~^~~~~
a.cc:11:49: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(c == "a" || c=="i" || c== "u" || c=="e" ||c=="o"){
| ~^~~~~
|
s116287928 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string c;
cin >> c;
if (c.at(0) == 'a') {
cout << "vowel" << endl;
}
elseif (c.at(0) == 'i') {
cout << "vowel" << endl;
}
elseif (c.at(0) == 'u') {
cout << "vowel" << endl;
}
elseif (c.at(0) == 'e') {
cout << "vowel" << endl;
}
elseif (c.at(0) == 'o') {
cout << "vowel" << endl;
}
else
cout << "consonant" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:5: error: 'elseif' was not declared in this scope
11 | elseif (c.at(0) == 'i') {
| ^~~~~~
a.cc:23:4: error: 'else' without a previous 'if'
23 | else
| ^~~~
a.cc: At global scope:
a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s077724910 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string c;
cin >> c;
if (c.at(0) == 'a') {
cout << vowel << endl;
}
elseif (c.at(0) == 'i') {
cout << vowel << endl;
}
elseif (c.at(0) == 'u') {
cout << vowel << endl;
}
elseif (c.at(0) == 'e') {
cout << vowel << endl;
}
elseif (c.at(0) == 'o') {
cout << vowel << endl;
}
else
cout << consonant << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:11: error: 'vowel' was not declared in this scope
9 | cout << vowel << endl;
| ^~~~~
a.cc:11:5: error: 'elseif' was not declared in this scope
11 | elseif (c.at(0) == 'i') {
| ^~~~~~
a.cc:23:4: error: 'else' without a previous 'if'
23 | else
| ^~~~
a.cc:24:11: error: 'consonant' was not declared in this scope
24 | cout << consonant << endl;
| ^~~~~~~~~
a.cc: At global scope:
a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s019444709 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string c;
cin >> c;
if (S.at(0) == 'a') {
cout << vowel << endl;
}
elseif (S.at(0) == 'i') {
cout << vowel << endl;
}
elseif (S.at(0) == 'u') {
cout << vowel << endl;
}
elseif (S.at(0) == 'e') {
cout << vowel << endl;
}
elseif (S.at(0) == 'o') {
cout << vowel << endl;
}
else
cout << consonant << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:9: error: 'S' was not declared in this scope
8 | if (S.at(0) == 'a') {
| ^
a.cc:9:11: error: 'vowel' was not declared in this scope
9 | cout << vowel << endl;
| ^~~~~
a.cc:11:13: error: 'S' was not declared in this scope
11 | elseif (S.at(0) == 'i') {
| ^
a.cc:11:5: error: 'elseif' was not declared in this scope
11 | elseif (S.at(0) == 'i') {
| ^~~~~~
a.cc:23:4: error: 'else' without a previous 'if'
23 | else
| ^~~~
a.cc:24:11: error: 'consonant' was not declared in this scope
24 | cout << consonant << endl;
| ^~~~~~~~~
a.cc: At global scope:
a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s807628535 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> N;
if(c=='a','i','u','e','o'){
cout << "vowel";
}
cout << "consonant";
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'N' was not declared in this scope
7 | cin >> N;
| ^
|
s588065512 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> N;
if(c==a,i,u,e,o){
cout << "vowel";
}
cout << "consonant";
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'N' was not declared in this scope
7 | cin >> N;
| ^
a.cc:9:9: error: 'a' was not declared in this scope
9 | if(c==a,i,u,e,o){
| ^
a.cc:9:11: error: 'i' was not declared in this scope
9 | if(c==a,i,u,e,o){
| ^
a.cc:9:13: error: 'u' was not declared in this scope
9 | if(c==a,i,u,e,o){
| ^
a.cc:9:15: error: 'e' was not declared in this scope
9 | if(c==a,i,u,e,o){
| ^
a.cc:9:17: error: 'o' was not declared in this scope
9 | if(c==a,i,u,e,o){
| ^
|
s385673764 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char alplabetchar;
cin>>alplabetchar;
if(alplabetchar=='e'or alplabetchar=='0'or alplabetchar=='a'or alplabetchar=='i'or alplabetchar=='u')
cout<< "vowel\n";
else
cout<<"consonant\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: unable to find character literal operator 'operator""or' with 'char' argument
7 | if(alplabetchar=='e'or alplabetchar=='0'or alplabetchar=='a'or alplabetchar=='i'or alplabetchar=='u')
| ^~~~~
a.cc:7:27: error: expected ')' before 'alplabetchar'
7 | if(alplabetchar=='e'or alplabetchar=='0'or alplabetchar=='a'or alplabetchar=='i'or alplabetchar=='u')
| ~ ^~~~~~~~~~~~~
| )
|
s442993669 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string c;cin>>c;
if(c=="a" &&c=="u"&&c=="e"&&c=="o"&&c=="i"{
cout<<"vowel";}
else cout<<"consonant";
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:43: error: expected ';' before '{' token
7 | if(c=="a" &&c=="u"&&c=="e"&&c=="o"&&c=="i"{
| ^
| ;
a.cc:9:1: error: expected primary-expression before 'else'
9 | else cout<<"consonant";
| ^~~~
a.cc:8:16: error: expected ')' before 'else'
8 | cout<<"vowel";}
| ^
| )
9 | else cout<<"consonant";
| ~~~~
a.cc:7:3: note: to match this '('
7 | if(c=="a" &&c=="u"&&c=="e"&&c=="o"&&c=="i"{
| ^
|
s039447633 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string c;cin>>c;
if(c=="a" &&c=="u"&&c=="e"&&c=="o"&&c=="i";
cout<<"vowel";}
else cout<<"consonant";
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:14: error: expected ')' before ';' token
8 | cout<<"vowel";}
| ^
| )
a.cc:7:3: note: to match this '('
7 | if(c=="a" &&c=="u"&&c=="e"&&c=="o"&&c=="i";
| ^
a.cc: At global scope:
a.cc:9:1: error: expected unqualified-id before 'else'
9 | else cout<<"consonant";
| ^~~~
a.cc:10:2: error: expected unqualified-id before 'return'
10 | return 0;
| ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
11 | }
| ^
|
s427478048 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if(S == "a" || S == "b" || S == "c" || S == "d" || S == "e"){
cout << "vowel" << endl;
}else{
cout << "consonant" << endl;
} | a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s835915444 | p03852 | C++ | p | a.cc:1:1: error: 'p' does not name a type
1 | p
| ^
|
s358987005 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char c ;
cin >> c ;
const string vowel = " aeiou ";
cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
} | a.cc: In function 'int main()':
a.cc:8:30: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'const std::__cxx11::basic_string<char>::size_type' {aka 'const long unsigned int'})
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~
| | |
| | const std::__cxx11::basic_string<char>::size_type {aka const long unsigned int}
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:8:30: note: candidate: 'operator==(int, std::__cxx11::basic_string<char>::size_type {aka long unsigned int})' (built-in)
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
a.cc:8:30: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::fpos<_StateT>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::allocator<_CharT>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long unsigned int'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:8:43: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << vowel . find ( c ) == string :: npos ? " vowel " : " consonant " << endl ;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11: |
s875899105 | p03852 | C++ | #include <iostream>
using namespace std;
char c;
cin >> c;
int main() {
if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') {
cout << "vowel" << endl;
}
else {
cout << "consonant" << endl;
}
}
| a.cc:5:1: error: 'cin' does not name a type
5 | cin >> c;
| ^~~
|
s703265019 | p03852 | C++ | #include <iostream>
using namespace std;
char c;
cin >> c;
int main() {
if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') {
cout << 'vowel' << endl;
}
else {
cout << 'consonant' << endl;
}
}
| a.cc:9:10: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
9 | cout << 'vowel' << endl;
| ^~~~~~~
a.cc:12:9: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
12 | cout << 'consonant' << endl;
| ^~~~~~~~~~~
a.cc:5:1: error: 'cin' does not name a type
5 | cin >> c;
| ^~~
|
s432542553 | p03852 | C++ | #include <iostream>
using namespace std;
char c;
cin >> c;
int main() {
char a,i,u,e,o;
cin >> a >> i >> u >> e >> o;
if (c == a || c == i || c == u || c == e || c == o) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
}
| a.cc:5:1: error: 'cin' does not name a type
5 | cin >> c;
| ^~~
a.cc: In function 'int main()':
a.cc:11:10: error: 'vowel' was not declared in this scope
11 | cout << vowel << endl;
| ^~~~~
a.cc:14:9: error: 'consonant' was not declared in this scope
14 | cout << consonant << endl;
| ^~~~~~~~~
|
s888688363 | p03852 | C++ | #include <iostream>
using namespace std;
char c;
cin >> c;
int main() {
if (c == a || c == i || c == u || c == e || c == o) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
}
| a.cc:5:1: error: 'cin' does not name a type
5 | cin >> c;
| ^~~
a.cc: In function 'int main()':
a.cc:8:10: error: 'a' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:20: error: 'i' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:30: error: 'u' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:40: error: 'e' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:50: error: 'o' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:9:10: error: 'vowel' was not declared in this scope
9 | cout << vowel << endl;
| ^~~~~
a.cc:12:9: error: 'consonant' was not declared in this scope
12 | cout << consonant << endl;
| ^~~~~~~~~
|
s878248090 | p03852 | C++ | #include <iostream>
using namespace std;
int c;
cin >> c;
int main() {
if (c == a || c == i || c == u || c == e || c == o) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
}
| a.cc:5:1: error: 'cin' does not name a type
5 | cin >> c;
| ^~~
a.cc: In function 'int main()':
a.cc:8:10: error: 'a' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:20: error: 'i' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:30: error: 'u' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:40: error: 'e' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:8:50: error: 'o' was not declared in this scope
8 | if (c == a || c == i || c == u || c == e || c == o) {
| ^
a.cc:9:10: error: 'vowel' was not declared in this scope
9 | cout << vowel << endl;
| ^~~~~
a.cc:12:9: error: 'consonant' was not declared in this scope
12 | cout << consonant << endl;
| ^~~~~~~~~
|
s601059700 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char c;
cin >>C;
if(c=='a'|| c=='e' || c=='u'|| c=='i' || c=='o'){
cout<<"vowel";
}
else {
cout<<"constant";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:8: error: 'C' was not declared in this scope
8 | cin >>C;
| ^
|
s286222612 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char B;
cin << B;
if(B == 'a' || B == 'i' || B == 'u' || B == 'e' || B == 'o'){
cout << "vowel" <<endl;
}
else{
cout << "consonant" <<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
6 | cin << B;
| ~~~ ^~ ~
| | |
| | char
| std::istream {aka std::basic_istream<char>}
a.cc:6:7: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin << B;
| ~~~~^~~~
a.cc:6:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin << B;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << B;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
68 |
s902620691 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char B
cin << B;
if(B == 'a' || B == 'i' || B == 'u' || B == 'e' || B == 'o'){
cout << "vowel" <<endl;
}
else{
cout << "consonant" <<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin << B;
| ^~~
a.cc:7:6: error: 'B' was not declared in this scope
7 | if(B == 'a' || B == 'i' || B == 'u' || B == 'e' || B == 'o'){
| ^
|
s775872367 | p03852 | C++ | #include <iostream>
using namespace std;
int main();
{
char c;
cin>>c;
if(c=='a')
cout<<"vowel"<<endl;
else if(c=='e')
cout<<"vowel"<<endl;
else if(c=='i')
cout<<"vowel"<<endl;
else if(c=='o')
cout<<"vowel"<<endl;
else if(c=='u')
cout<<"vowel"<<endl;
else
cout<<"consonant"<<endl;
} | a.cc:4:1: error: expected unqualified-id before '{' token
4 | {
| ^
|
s736161542 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
string x ;
cout <<"please enter the letter " << endl;
cin >> x ;
if {
x == "a" || x == "e" || x == "i" || x == "o" || x == "o" endl;
cout << "vowel" << endl;
else
cout << "consonant" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:7: error: expected '(' before '{' token
11 | if {
| ^
| (
|
s604493159 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
char a;
cin >> a;
if(a=='a')cout << "vowel" <<endl;
else if(a=='i')cout << "vowel" <<endl;
else if(a=='u')cout << "vowel" <<endl;
else if(a=='e')cout << "vowel" <<endl;
else if(a=='o')cout << "vowel" <<endl;
else cout << consonant << endl;
}
| a.cc: In function 'int main()':
a.cc:13:16: error: 'consonant' was not declared in this scope
13 | else cout << consonant << endl;
| ^~~~~~~~~
|
s328389459 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
char a;
cin >> a;
if(a='a')cout << "vowel" <<endl;
if(a='i')cout << "vowel" <<endl;
if(a='u')cout << "vowel" <<endl;
if(a='e')cout << "vowel" <<endl;
if(a='o')cout << "vowel" <<endl;
else cout << consonant << endl;
}
| a.cc: In function 'int main()':
a.cc:13:16: error: 'consonant' was not declared in this scope
13 | else cout << consonant << endl;
| ^~~~~~~~~
|
s043912508 | p03852 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a;
cin >> a;
cout << ((a == "a" || a == "i" || a == "u" || a == "e" || a == "o") ? "vowel":"consonant") << endl; | a.cc: In function 'int main()':
a.cc:7:102: error: expected '}' at end of input
7 | cout << ((a == "a" || a == "i" || a == "u" || a == "e" || a == "o") ? "vowel":"consonant") << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s275813141 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
| ~^~~~~~
a.cc:7:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
| ~^~~~~~
a.cc:7:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
| ~^~~~~
a.cc:7:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
| ~^~~~~
a.cc:7:49: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c== "a" || c== "i" || c=="u" || c=="e" || c=="o"){
| ~^~~~~
|
s715178276 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c== a || c== i || c==u || c==e || c==o){
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:10: error: 'a' was not declared in this scope
7 | if(c== a || c== i || c==u || c==e || c==o){
| ^
a.cc:7:19: error: 'i' was not declared in this scope
7 | if(c== a || c== i || c==u || c==e || c==o){
| ^
a.cc:7:27: error: 'u' was not declared in this scope
7 | if(c== a || c== i || c==u || c==e || c==o){
| ^
a.cc:7:35: error: 'e' was not declared in this scope
7 | if(c== a || c== i || c==u || c==e || c==o){
| ^
a.cc:7:43: error: 'o' was not declared in this scope
7 | if(c== a || c== i || c==u || c==e || c==o){
| ^
|
s629228847 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
cout << "vowel" << endl;
} else {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
| ~^~~~~
a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
| ~^~~~~
a.cc:7:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
| ~^~~~~
a.cc:7:36: error: 'e' was not declared in this scope
7 | if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
| ^
a.cc:7:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(c=="a" || c=="i" || c=="u" || e=="e" || c=="o"){
| ~^~~~~
|
s764252209 | p03852 | C++ | char c;
cin >> c;
const string vowel = "aeiou";
cout << vowel.find(c) == string::npos? "vowel" :"consonant" << endl;
| a.cc:2:1: error: 'cin' does not name a type
2 | cin >> c;
| ^~~
a.cc:3:7: error: 'string' does not name a type
3 | const string vowel = "aeiou";
| ^~~~~~
a.cc:4:1: error: 'cout' does not name a type
4 | cout << vowel.find(c) == string::npos? "vowel" :"consonant" << endl;
| ^~~~
|
s903455461 | p03852 | C++ | char c;
cin >> c;
const string vowel = "aeiou";
cout << vowel.find(c) == string::npos? "consonant" << endl; | a.cc:2:1: error: 'cin' does not name a type
2 | cin >> c;
| ^~~
a.cc:3:7: error: 'string' does not name a type
3 | const string vowel = "aeiou";
| ^~~~~~
a.cc:4:1: error: 'cout' does not name a type
4 | cout << vowel.find(c) == string::npos? "consonant" << endl;
| ^~~~
|
s228158498 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
char n;
cin >> n;
if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
cout << "vowel" << endl;
}
else {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
| ~~^~~~~~
a.cc:9:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
| ~~^~~~~~
a.cc:9:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
| ~~^~~~~~
a.cc:9:49: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
| ~~^~~~~~
a.cc:9:61: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (n == "a" || n == "i" || n == "u" || n == "e" || n == "o") {
| ~~^~~~~~
|
s890617410 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
char n;
cin >> n;
if (n == a || n == i || n == u || n == e || n == o) {
cout << "vowel" << endl;
}
else {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:16: error: 'a' was not declared in this scope
9 | if (n == a || n == i || n == u || n == e || n == o) {
| ^
a.cc:9:26: error: 'i' was not declared in this scope
9 | if (n == a || n == i || n == u || n == e || n == o) {
| ^
a.cc:9:36: error: 'u' was not declared in this scope
9 | if (n == a || n == i || n == u || n == e || n == o) {
| ^
a.cc:9:46: error: 'e' was not declared in this scope
9 | if (n == a || n == i || n == u || n == e || n == o) {
| ^
a.cc:9:56: error: 'o' was not declared in this scope
9 | if (n == a || n == i || n == u || n == e || n == o) {
| ^
|
s865813709 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c=='a'||c=='i')
cout<< "vowel"<< endl;
else if(c=='u'||c=='e')
cout<< "vowel"<< endl;
else if(c=='o')
cout<<"vowel"<< endl;
else
cout << "consonant" <<ensl;
}
| a.cc: In function 'int main()':
a.cc:15:27: error: 'ensl' was not declared in this scope
15 | cout << "consonant" <<ensl;
| ^~~~
|
s024992491 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char c;
cin >> c;
if(c=='a'||c=='i')
cout<< vowel<< endl;
else if(c=='u'||c=='e')
cout<< vowel<< endl;
else if(c=='o')
cout<<vowel<< endl;
else
cout << consonant <<ensl;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: 'vowel' was not declared in this scope
9 | cout<< vowel<< endl;
| ^~~~~
a.cc:11:12: error: 'vowel' was not declared in this scope
11 | cout<< vowel<< endl;
| ^~~~~
a.cc:13:11: error: 'vowel' was not declared in this scope
13 | cout<<vowel<< endl;
| ^~~~~
a.cc:15:13: error: 'consonant' was not declared in this scope
15 | cout << consonant <<ensl;
| ^~~~~~~~~
a.cc:15:25: error: 'ensl' was not declared in this scope
15 | cout << consonant <<ensl;
| ^~~~
|
s655646589 | p03852 | C++ | #include<cstdio>
using namespace std;
int main()
{
char a;
cin>>a;
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u')
printf("vowel");
else printf("consonant");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>a;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cstdio>
+++ |+#include <iostream>
2 | using namespace std;
|
s177828741 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
cin >> c;
if(c == ('a' || 'e' || 'i' || 'o' || 'u')){
cout << "consonant" << endl;
}
else{
cout << "vowel" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:12: error: 'c' was not declared in this scope
7 | cin >> c;
| ^
|
s028093823 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
cin >> c;
if(c == ('a' || 'e' || 'i' || 'o' || 'u'){
cout << "consonant" << endl;
}
else{
cout << "vowel" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:12: error: 'c' was not declared in this scope
7 | cin >> c;
| ^
a.cc:8:46: error: expected ')' before '{' token
8 | if(c == ('a' || 'e' || 'i' || 'o' || 'u'){
| ~ ^
| )
a.cc:14:1: error: expected primary-expression before '}' token
14 | }
| ^
|
s362995860 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char c;
cin >> c;
if(c == ('a' || 'e' || 'i' || 'o' || 'u'){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:46: error: expected ')' before '{' token
8 | if(c == ('a' || 'e' || 'i' || 'o' || 'u'){
| ~ ^
| )
a.cc:14:1: error: expected primary-expression before '}' token
14 | }
| ^
|
s755349365 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
cin >> c;
if(c == "a" || "e" || "i" || "o" || "u"){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:12: error: 'c' was not declared in this scope
7 | cin >> c;
| ^
|
s426666152 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
cin >> c;
if(c == ("a" || "e" || "i" || "o" || "u")){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:12: error: 'c' was not declared in this scope
7 | cin >> c;
| ^
|
s423007388 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
cin >> c;
if(c == ("a" || "e" || "i" || "o" || "u")){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:12: error: 'c' was not declared in this scope
7 | cin >> c;
| ^
|
s748598899 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
string vowel[] = {"a", "e", "i", "o", "u"};
cin >> c;
if(c == vowel[]){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
a.cc:9:19: error: expected primary-expression before ']' token
9 | if(c == vowel[]){
| ^
|
s508751752 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
string vowel = ["a", "e", "i", "o", "u"];
cin >> c;
if(c == vowel){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:21: error: expected identifier before string constant
7 | string vowel = ["a", "e", "i", "o", "u"];
| ^~~
a.cc:7:24: error: expected ']' before ',' token
7 | string vowel = ["a", "e", "i", "o", "u"];
| ^
| ]
a.cc: In lambda function:
a.cc:7:24: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:7:20: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
7 | string vowel = ["a", "e", "i", "o", "u"];
| ^~~~
a.cc:7:26: error: expected unqualified-id before string constant
7 | string vowel = ["a", "e", "i", "o", "u"];
| ^~~
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
|
s876635217 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
string vowel = "a", "e", "i", "o", "u";
cin >> c;
if(c == vowel){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:25: error: expected unqualified-id before string constant
7 | string vowel = "a", "e", "i", "o", "u";
| ^~~
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
|
s445727639 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
char = c;
char vowel = "a", "e", "i", "o", "u";
cin >> c;
if(c == vowel){
cout << "vowel" << endl;
}
else{
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '=' token
6 | char = c;
| ^
a.cc:7:18: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
7 | char vowel = "a", "e", "i", "o", "u";
| ^~~
| |
| const char*
a.cc:7:23: error: expected unqualified-id before string constant
7 | char vowel = "a", "e", "i", "o", "u";
| ^~~
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
|
s456607436 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
string ch;
cin>>ch;
if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
cout<<"vowel. ";
}
else {
cout<<"consonant.";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: mismatched types 'const _CharT*' and 'char'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:9:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} i |
s647016502 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char ch;
cin>>ch;
if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
cout<<"vowel. ";
}
else {
cout<<"consonant.";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:33: error: unable to find character literal operator 'operator""or' with 'char' argument
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ^~~~~
a.cc:9:38: error: expected ')' before 'ch'
9 | if (ch=='a' or ch=='o' or ch=='e'or ch=='i' or ch=='u'){
| ~ ^~~
| )
|
s676327920 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char str;
cin>>str;
if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
cout<<"vowel. ";
}
else {
cout<<"consonant.";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: unable to find character literal operator 'operator""or' with 'char' argument
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ^~~~~
a.cc:9:41: error: expected ')' before 'str'
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ~ ^~~~
| )
|
s147848473 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char str;
cin>>str;
if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
cout<<"vowel. ";
}
else {
cout<<"consonant.";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: unable to find character literal operator 'operator""or' with 'char' argument
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ^~~~~
a.cc:9:41: error: expected ')' before 'str'
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ~ ^~~~
| )
|
s789974169 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char str;
cin>>str;
if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
cout<<"vouel";
}
else {
cout<<"constant";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: unable to find character literal operator 'operator""or' with 'char' argument
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ^~~~~
a.cc:9:41: error: expected ')' before 'str'
9 | if (str=='a' or str=='o' or str=='e'or str=='i' or str=='u'){
| ~ ^~~~
| )
|
s024738492 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
char x;
char z[]={'a','e','u','i','o'};
int main(){
cin>>x;
int c=0;
for(int i=0;i<=4;i++) {
if (z[i] == x) {
c += 1
}
}
if(c>0){
cout<<"vowel"<<endl;
} else{
cout<<"consonant"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before '}' token
11 | c += 1
| ^
| ;
12 | }
| ~
|
s269233785 | p03852 | C++ | #include <iostream>
using namespace std;
int main() {
char a;
cin>> a;
if (a=='a' || a=="u")
{cout<<"vowel";}
else{cout<<"cons" ;}
}
| a.cc: In function 'int main()':
a.cc:6:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
6 | if (a=='a' || a=="u")
| ~^~~~~
|
s975403738 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char letter;
cin>>letter;
if(asd=='a' || asd=='e' || letter=='i' || letter == 'u' || letter == 'o'){
cout<<"vowel"<<endl;
}
else{
cout<<"consonant"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:6: error: 'asd' was not declared in this scope
9 | if(asd=='a' || asd=='e' || letter=='i' || letter == 'u' || letter == 'o'){
| ^~~
|
s735407842 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char letter;
cin>>letter;
if(letter=='a'|| etter=='e'||letter=='i '||letter =='u'||letter =='o'){
cout<<"vowel";
}
else{
cout<<"consonant";
}
return 0;
}
| a.cc:9:40: warning: multi-character character constant [-Wmultichar]
9 | if(letter=='a'|| etter=='e'||letter=='i '||letter =='u'||letter =='o'){
| ^~~~
a.cc: In function 'int main()':
a.cc:9:20: error: 'etter' was not declared in this scope; did you mean 'letter'?
9 | if(letter=='a'|| etter=='e'||letter=='i '||letter =='u'||letter =='o'){
| ^~~~~
| letter
|
s085840340 | p03852 | C++ | #include <iostream>
using namespace std;
int main ()
{
char c ;
cin>> c;
if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
cout<< "vowel"<< endl;
else
cout<< "consonant"<< endl;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
| ~^~~~~
a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
| ~^~~~~~
a.cc:7:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
| ~^~~~~
a.cc:7:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
| ~^~~~~
a.cc:7:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if ( c=="o" || c=="i "|| c=="e" || c=="a" || c=="u")
| ~^~~~~
|
s393604712 | p03852 | C++ | #include <iostream>
using namespace std;
int main ()
{
char c,o,i,e,a,u ;
string vowel, consonant ;
cin>> c;
if ( c==o || c==i || c==e || c==a || c==u)
cout<< vowel<< endl;
else
cout<< consonant<< endl;
return 0
} | a.cc: In function 'int main()':
a.cc:12:9: error: expected ';' before '}' token
12 | return 0
| ^
| ;
13 | }
| ~
|
s689895526 | p03852 | C++ | #include <iostream>
using namespace std;
int main ()
{
char c,o,i,e,a,u ;
cin>> c;
if ( c==o || c==i || c==e || c==a || c==u)
cout<< vowel<< endl;
else
cout<< consonant<< endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: 'vowel' was not declared in this scope
8 | cout<< vowel<< endl;
| ^~~~~
a.cc:10:8: error: 'consonant' was not declared in this scope
10 | cout<< consonant<< endl;
| ^~~~~~~~~
|
s441447099 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char c;
cin>> c;
if ( c==o || c==e || c==i || c==u || c==a )
cout<<vowel<<endl;
else
cout<<consonant<<endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'o' was not declared in this scope
7 | if ( c==o || c==e || c==i || c==u || c==a )
| ^
a.cc:7:17: error: 'e' was not declared in this scope
7 | if ( c==o || c==e || c==i || c==u || c==a )
| ^
a.cc:7:25: error: 'i' was not declared in this scope
7 | if ( c==o || c==e || c==i || c==u || c==a )
| ^
a.cc:7:33: error: 'u' was not declared in this scope
7 | if ( c==o || c==e || c==i || c==u || c==a )
| ^
a.cc:7:41: error: 'a' was not declared in this scope
7 | if ( c==o || c==e || c==i || c==u || c==a )
| ^
a.cc:8:11: error: 'vowel' was not declared in this scope
8 | cout<<vowel<<endl;
| ^~~~~
a.cc:10:11: error: 'consonant' was not declared in this scope
10 | cout<<consonant<<endl;
| ^~~~~~~~~
|
s264045661 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char c;
cin>>c;
if(c=="a"||"e"||"i"||"o"||"u"){
cout<<"vowel"<<endl;
}
else{
cout<<"consonant"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if(c=="a"||"e"||"i"||"o"||"u"){
| ~^~~~~
|
s701806668 | p03852 | C++ | #include <iostream>
int main() {
string a ;
cin >> a ;
if (a == "a" || a == "e" || a == "o" || a == "i" || a == "u") {
cout << "vowel" << endl;
}
else {
cout << "consonant" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
4 | string a ;
| ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a ;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:16: error: 'a' was not declared in this scope
5 | cin >> a ;
| ^
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << "vowel" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << "vowel" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << "consonant" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << "consonant" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s302447250 | p03852 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int hight = sc.nextInt();
int wide = sc.nextInt();
for (int i = 0; i < hight; i++) {
String output = sc.next();
System.out.print("\n" + output);
System.out.print("\n" + output);
}
sc.close();
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s548055132 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c, a, e, i, o, u;
cin >> c;
if (c=a||e||i||o||u) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:11:13: error: 'consonant' was not declared in this scope
11 | cout << consonant << endl;
| ^~~~~~~~~
|
s116358845 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c, a, e, i, o, u;
cin >> c;
if (c=a||e||i||o||u) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:11:13: error: 'consonant' was not declared in this scope
11 | cout << consonant << endl;
| ^~~~~~~~~
|
s653635567 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if (c=a||e||i||o||u) {
cout << vowel << endl;
}
else {
cout << consonant << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'a' was not declared in this scope
7 | if (c=a||e||i||o||u) {
| ^
a.cc:7:12: error: 'e' was not declared in this scope
7 | if (c=a||e||i||o||u) {
| ^
a.cc:7:15: error: 'i' was not declared in this scope
7 | if (c=a||e||i||o||u) {
| ^
a.cc:7:18: error: 'o' was not declared in this scope
7 | if (c=a||e||i||o||u) {
| ^
a.cc:7:21: error: 'u' was not declared in this scope
7 | if (c=a||e||i||o||u) {
| ^
a.cc:8:13: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:11:13: error: 'consonant' was not declared in this scope
11 | cout << consonant << endl;
| ^~~~~~~~~
|
s657537364 | p03852 | Java | import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class MainA {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String input = sc.next();
String ans;
String [] vowel = {"a", "e", "i", "o", "u"};
List<String> aa = Arrays.asList(vowel);
if (aa.contains(input)) {
ans = "vowel";
} else {
ans = "consonant";
}
System.out.println(ans);
sc.close();
}
} | Main.java:5: error: class MainA is public, should be declared in a file named MainA.java
public class MainA {
^
1 error
|
s732705024 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string c;
cin >> c;
if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
cout << "vowel" << endl;
else
cout << "consonant" << endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
8 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_s |
s314986610 | p03852 | C++ | #include <iostream>
#include<string>
using namespace std;
int main()
{
char c;
cin>>c;
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
cout << "is vowel" ;
else
cout<<"is constant";
return 0; | a.cc: In function 'int main()':
a.cc:14:14: error: expected '}' at end of input
14 | return 0;
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s842495446 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main( ){
char c;
cin>>c;
if(c==a || c==i || c==u || c==e || c==0)
cout<<'vowel'<<endl;
else
cout<<'consonant'<<endl;
} | a.cc:7:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
7 | cout<<'vowel'<<endl;
| ^~~~~~~
a.cc:9:7: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
9 | cout<<'consonant'<<endl;
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'a' was not declared in this scope
6 | if(c==a || c==i || c==u || c==e || c==0)
| ^
a.cc:6:15: error: 'i' was not declared in this scope
6 | if(c==a || c==i || c==u || c==e || c==0)
| ^
a.cc:6:23: error: 'u' was not declared in this scope
6 | if(c==a || c==i || c==u || c==e || c==0)
| ^
a.cc:6:31: error: 'e' was not declared in this scope
6 | if(c==a || c==i || c==u || c==e || c==0)
| ^
|
s536763332 | p03852 | Java | package welcome;
import java.util.Scanner;
public class hello {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
char x=input.next().charAt(0);
if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u') {System.out.println("vowel");}
else {System.out.println("consonant");}
}
} | Main.java:3: error: class hello is public, should be declared in a file named hello.java
public class hello {
^
1 error
|
s730309757 | p03852 | Java | package JUOIAUAI;
import java.util.Scanner;
public class JUOIAUAI {
public static void main(String[] args) {
Scanner read =new Scanner (System.in);
char x;
x=read.next().charAt(0);
if(x=='a'||x=='o'||x=='u'||x=='e'||x=='i') {
System.out.println("vowel");
}
else { System.out.println("consonant");}
}
}
| Main.java:5: error: class JUOIAUAI is public, should be declared in a file named JUOIAUAI.java
public class JUOIAUAI {
^
1 error
|
s527880979 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
char x;
cin >> x
if ( x == 'a', 'e', 'i', 'o', 'u' ) {
cout << "vowel" << endl;
}
else if ( x != 'a', 'e', 'i', 'o', 'u' ) {
cout << "consonant" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'if'
6 | cin >> x
| ^
| ;
7 | if ( x == 'a', 'e', 'i', 'o', 'u' ) {
| ~~
a.cc:10:3: error: 'else' without a previous 'if'
10 | else if ( x != 'a', 'e', 'i', 'o', 'u' ) {
| ^~~~
|
s926054665 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
char c ;
cin >> c;
if( c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ){
cout << vowel << endl;
}
else {
cout << consonant <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:17: error: 'vowel' was not declared in this scope
10 | cout << vowel << endl;
| ^~~~~
a.cc:13:17: error: 'consonant' was not declared in this scope
13 | cout << consonant <<endl;
| ^~~~~~~~~
|
s336302209 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;
int main() {
char a;
cin >> a;
if (a=='a' || a=='i' || a=='u' || a=='e' || a=='o') cout << "vowel" << endl;
else cout << "consonant" endl;
}
| a.cc: In function 'int main()':
a.cc:19:27: error: expected ';' before 'endl'
19 | else cout << "consonant" endl;
| ^~~~~
| ;
|
s879284281 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o'){
cout << vowel << endl;
}
else{
cout << consonant <<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:11:9: error: 'consonant' was not declared in this scope
11 | cout << consonant <<endl;
| ^~~~~~~~~
|
s249672961 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if(c='a'||c='i'||c='u'||c='e'||c='o'){
cout << vowel << endl;
}
else{
cout << consonant <<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:30: error: lvalue required as left operand of assignment
7 | if(c='a'||c='i'||c='u'||c='e'||c='o'){
| ~~~^~~
a.cc:8:9: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:11:9: error: 'consonant' was not declared in this scope
11 | cout << consonant <<endl;
| ^~~~~~~~~
|
s705413116 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o'){
cout << vowel << endl;
}
else(){
cout << consonant <<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'vowel' was not declared in this scope
8 | cout << vowel << endl;
| ^~~~~
a.cc:10:6: error: expected primary-expression before ')' token
10 | else(){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.