Computer Science, asked by relangipraveena99, 7 months ago

Meera has passed her exam or not
Meera wrote SBI PO exam and was waiting for her result. After a week, SBI released the results on its website. On the website, she needs to click the results after that she will get a pdf. In that pdf, test passed candidate register numbers are displayed. Then, Meera has to check whether her register number is there or not. If her register number is found, then she has passed her exam. Otherwise, she failed.
Input Format:

The first input contains an integer 'n' which denotes the number of candidates who have passed the exam

The remaining input denotes register number of 'n' candidates separated by spaces

The last input contains an integer which denotes the register number of Meera

Output Format:

If the register number is found, print "She passed her exam".Otherwise, print "She failed".

Sample Input:

5

34 46 52 32 265

32

Sample Output:

She passed her exam

Case 1
Case 2
Case 3
Input (stdin)
10
234 567 876 456 345 112 334 445 667 889
667

Output (stdout)
She passed her exam

Answers

Answered by zanairamirza08
1

Explanation:

I can't say it's too big I don't know that answer it's too big

Answered by mayursanjaydeshmukh
1

Answer:

#include<iostream>

using namespace std;

int main()

{

 int b,m,n,i,flag;

 cin>>n;

 int a[n];

 for( i = 0;i<n;i++)

 {

   cin>>a[i];

 }

 cin>>m;

 for(i=0;i<n;i++)

 {

 if(a[i]==m)

 {

   flag =1;

   break;

 }

 }

if(flag == 1)

 {

   

 cout<<"She passed her exam";

 }

 else

 {

   cout<<"She failed";

 }

}

Explanation:

all test cases are passed.

Similar questions