#include <iostream>
using namespace std;
void mamusomtijebal()
{
int main()
{
float vaha = 0;
cout << "Zadaj svoju vahu" << endl;
cin >> vaha;
}
if (vaha => 80) {
cout << "Ty velryba";
}
if (vaha <= 70) {
cout << "Skeleton pojebany";
}
}
I am new to c++ and this is my problem i don’t see anything wrong with my code what should i do?
>Solution :
int main should be outside, not inside any function–in your case, mamusomtijebal().
Also, the operator is >=, not =>.
Use this code:
#include <iostream>
using namespace std;
int main() {
float vaha = 0;
cout << "Zadaj svoju vahu" << endl;
cin >> vaha;
if (vaha >= 80) {
cout << "Ty velryba" << endl;
} else if (vaha <= 70) {
cout << "Skeleton pojebany" << endl;
}
}