Question: #include #include using namespace std; bool valid ( string atm ) { reverse ( atm . begin ( ) , atm.end ( ) ) ;

#include
#include
using namespace std;
bool valid(string atm){
reverse(atm.begin(),atm.end());
int sum=0;
for(int i=0; i9)
{
digit=digit-9;
}
}
sum=sum+digit;
}//Loop
return(sum %10==0);
}//Function
int main(){
cout<<"Enter Atm Card Number:"<>atm;
if (valid(atm))
{
system("cls");
cout<<"Your Card Number:"<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!