[Logo] Mendo Judge Discussion Board - Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
Messages posted by: David1223
Forum Index » Profile for David1223 » Messages posted by David1223
Author Message
mojot kod:
#include <iostream>
#include <string>
using namespace std;

int main()
{
float c;
string p;
cin >> p >> c;
int br, pro=0;
cin >> br;
if(c>=1 && c<=1000 && br>=1 && br<=50) {
string niza[br];
for(int j=1; j<=br ;j++) {
cin >> niza[j];
}
for(int i=1; i<=br ;i++) {
if(p==niza[i]) {
pro=1;
}
}
if(pro==1) {
c=c+c/20;
} else {
c=c+c*18/100;
}
cout << c;
}
return 0;
}
mi prikazuva runtime error
 
Forum Index » Profile for David1223 » Messages posted by David1223
Go to:   
Powered by JForum 2.1.8 © JForum Team