Computer Science, asked by mammootty9292, 2 months ago

#include <iostream>
using namespace std;
int main()
{
int a , b;
char c;
cout<<"Hello I'm a program To find the Biggest Number amoung Two Numbers ╮(^▽^)╭"<<endl;
cout<<"/nDo you want to use me , If yes type Y , if No type N (Y Or N): ";
cin>>c;
if (c == 'N' || c == 'n')
{ cout<<"it's ok I can understand";}

else (c=='Y' || c=='y')
cout<<"\nOk Let's start";
cout<<"\nPlease Enter the First number: ";
cin>>a;
cout<<"\nPlease Enter the Second Number: ";
cin>>b;
if(a>b)
{ cout<<"Biggest number is: "<<a;}
else
{ cout<<"\nBiggest Number is: "<<b;}
return 0;

}

Hi In here , How can I stop and break the first if statement?The first If statement is if (c == 'N' || c == 'n')?
Why the second else statement is not working?​

Answers

Answered by HARSHITKUMAR2412
1

Answer:

#include <iostream>

using namespace std;

int main()

{

int a , b;

char c;

cout<<"Hello I'm a program To find the Biggest Number amoung Two Numbers ╮(^▽^)╭"<<endl;

cout<<"/nDo you want to use me , If yes type Y , if No type N (Y Or N): ";

cin>>c;

if (c == 'N' || c == 'n')

{ cout<<"it's ok I can understand";}

else (c=='Y' || c=='y')

cout<<"\nOk Let's start";

cout<<"\nPlease Enter the First number: ";

cin>>a;

cout<<"\nPlease Enter the Second Number: ";

cin>>b;

if(a>b)

{ cout<<"Biggest number is: "<<a;}

else

{ cout<<"\nBiggest Number is: "<<b;}

return 0;

}

Hi In here , How can I stop and break the first if statement?The first If statement is if (c == 'N' || c == 'n')?

Why the second else statement is not working?​done

Explanation:

Similar questions