my code:-
#include
using namespace std;
int main(){
cout<<"enter no. of inputs ";
int n;
cin>>n;
while(n>0){
int k;
cout<<"enter the no. : ";
cin>>k;
cout<<"square of “<<k<<” is "<<k*k<<endl;
n–;
}
}
my doubt :
I am not able to link the input .txt file
it throws an error.
error message :
PS C:\Users\USER\Documents> .\s6.exe < input6.txt
At line:1 char:10
- .\s6.exe < input6.txt
-
~
The ‘<’ operator is reserved for future use.
+ CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported