|
-
June 23rd, 2006, 03:56 AM
#6
Re: I'm new in C++, where to start from ?
Well, I made a little program, but I would like to know couple of things.
Here is my program
Code:
#include <iostream.h>
int main()
{
float a, b;
cout<<"Enter voltage: ";
cin>>a;
cout<<"Enter amperage: ";
cin>>b;
cout<<"---------------------------------------\n\n";
cout<<"Power: ";cout<<a*b;cout <<"W";
system("pause");
return 0;
}
Well, I want to put this program to repeat, not to terminate it after the first calculation. And how can I enter line breaks, I want to put the message "Press any key to continue" below. P.S - I can't use \n to do this.
Hope you understand
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|