Is there a efficient way to do multiple test cases in c?

Posted by Ahmed Abdelaal on Stack Overflow See other posts from Stack Overflow or by Ahmed Abdelaal
Published on 2013-10-20T15:51:01Z Indexed on 2013/10/20 15:53 UTC
Read the original article Hit count: 229

Filed under:
|
|

I use MS Visual Studio and I am new to C++, so I am just wondering if there is an faster more efficient way to do multiple test cases instead of keep clicking CTRL+F5 and re-opening the console many times.

Like for example if I have this code

#include <iostream> 
using namespace std;
void main ()
{
int x;
cout<<"Enter a number"<<endl;
cin>>x;
cout<<x*2<<endl;
}

Is there a way I could try different values of x at once and getting the results together?

Thanks

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-studio-2010