#include <iostream>
using namespace std;
int main()
{
const int pin1 = 123;
const int accnum1= 23;
int pin;
int accnum;
cout << "Enter Pin" <<endl;
cin >> pin;
cout << "Enter account number" <<endl;
cin >> accnum;
if (pin1 == pin) && (accnum1 == accnum) // line 15
{
cout<<" you passed";
}
return 0;
it says there is an error at line 15(indicated)
directorabbey
0
Newbie Poster
Recommended Answers
Jump to PostYes. It needs to be either of these two ways:
if (pin1 == pin && accnum1 == accnum)
or this
if ((pin1 == pin) && (accnum1 == accnum))
All 4 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
directorabbey
0
Newbie Poster
directorabbey
0
Newbie Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.