Code:
#include <iostream>
using namespace std;
int main()
{
int voltage,resistance,current;
cout<<"enter current(amps):\t"<<endl;
cin>>current;
cout<<"enter resistance(ohms):\t"<<endl;
cin>>resistance;
voltage=current*resistance;
//put the following in one command and used \n so that the program is a tad more efficient :D
cout<<"current:\t"<<current
<<"\nresistance:\t"<<resistance
<<"\nvoltage:\t"<<voltage<<endl;
cin.ignore(); //incase there is something in the input stream, this clears it so that cin.get(); can work properly
cin.get(); //so that the program will pause before exiting
return 0; //always return 0 if the program runs successfully
}
Doctored it up for you.