Să se scrie un program care citește un cuvânt și îl afișează după interschimbarea primei vocale cu ultima consoană.
Problema | InterschimbareLitere | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54746931 | Utilizator | |
Fișier | interschimbarelitere.cpp | Dimensiune | 998 B |
Data încărcării | 07 Decembrie 2024, 11:16 | Scor / rezultat | Eroare de compilare |
interschimbarelitere.cpp: In function 'int main()': interschimbarelitere.cpp:10:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < strlen(s);i++) ^ interschimbarelitere.cpp:15:29: error: invalid conversion from 'char' to 'char*' [-fpermissive] strcpy(val1,s[i]); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 1 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:15:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive] strcpy(val1,s[i]); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 2 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:25:29: error: invalid conversion from 'char' to 'char*' [-fpermissive] strcpy(val2,s[j]); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 1 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:25:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive] strcpy(val2,s[j]); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 2 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:32:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < strlen(s); i++) ^ interschimbarelitere.cpp:36:27: error: invalid conversion from 'char' to 'char*' [-fpermissive] strcpy(s[i],val1); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 1 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:36:33: error: invalid conversion from 'char' to 'const char*' [-fpermissive] strcpy(s[i],val1); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 2 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:40:27: error: invalid conversion from 'char' to 'char*' [-fpermissive] strcpy(s[i],val2); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 1 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^ interschimbarelitere.cpp:40:33: error: invalid conversion from 'char' to 'const char*' [-fpermissive] strcpy(s[i],val2); ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from interschimbarelitere.cpp:1: /usr/include/i386-linux-gnu/bits/string3.h:102:1: error: initializing argument 2 of 'char* strcpy(char*, const char*)' [-fpermissive] __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InterschimbareLitere face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.