#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float amt;
cout<< “\n enter amount of product”;
cin>> amt;
if(amt <= 500)
{
float x;
cout<< “\n discount=0” ;
x= amt;
cout<< “\n billed amount” <<x;
}
if((amt >= 501)&&(amt <= 2000))
{
float x;
cout<< “\n discount=5%”;
x=(amt/100)*95;
cout<< “\n billed amount” <<x;
}
if((amt >= 2001)&&(amt <= 3000))
{
float x;
cout<< “\n discount=10%”;
x=(amt/100)*90;
cout<< “\n billed amount” <<x ;
}
if(amt >= 3001)
{
float x;
cout<< “\n discount=15%” ;
x=(amt/100)*85;
cout<< “\n billed amount” <<x;
}
getchar();
}
The above code is a small sample of what coding i have to do for school purpose, and i can run this without any difficulties on Turbo C++. When i try running the similar code on either codelite or under the C++ option under Xcode, I'm unable too. Please suggest an alternative if any
Regards