The following program runs fine on Visual Studio 2005 and gives me 0 Errors when I compile it. It is not executing on Visual Studio 2008. What could be the reason?
#include<iostream>
using namespace std;
void main(){
int qty;
int sp;
double sv;
double disc;
double netsv;
cout<<"please enter quantity"<<endl;
cin>>qty;
cout<<"please enter selling price"<<endl;
cin>>sp;
sv=sp*qty;
if(sv>1000){
disc=sv*0.1;
}else{
disc=0;
}
netsv=sv-disc;
cout<<"net price:"<<netsv<<endl;
}