#include<iostream.h>
int main(){
int rs[10],hours[10],cars[10];
for(int i=1;i<=10;++i){
cout<<"Enter number car number"<<endl;
cin>>cars[i];
cout<<"Enter parking hours"<<endl;
cin>>hours[i];
if(hours[i]<=3){
rs[i]=30;
cout<<rs[i]<<endl;
}
if(hours[i]>3 && hours[i]<24){
rs[i]=30+(hours[i]-3)*5;
cout<<rs[i]<<endl;
}
if(hours[i]==24){
rs[i]=80;
cout<<rs[i]<<endl;
}
}
return 0;}
Comments
Leave a comment