int priority(char x)
{
   if(x == '(')
 return(0);
   if(x == '+' || x == '-')
 return(1);
   if(x == '*' || x == '/' || x == '%
')
 return(2);
   return(3);

asked 15 May '15, 13:16

Golam%20Kibria%20Sajib's gravatar image

Golam Kibria Sajib
4710

edited 15 May '15, 14:58

__salman__'s gravatar image

__salman__ ♦♦
1.1k211

ইংরেজি অক্ষরে বাংলা লেখার জন্য -1

(15 May '15, 15:00) __salman__ ♦♦

jodi condition ta false hoy tahole return korbe 3.... if condition a match na korle return hobe 3.

permanent link

answered 15 May '15, 15:41

polash's gravatar image

polash
212

যদি কোন if condition ই true না হয়, তবে return 3 হবে। code টি এভাবে লিখতে পারেনঃ

   int priority(char x)
{
   if(x == '(')
        return 0;
   if(x == '+' || x == '-')
        return 1;
   if(x == '*' || x == '/' || x == '%')
         return 2;
   else
         return 3;
}
permanent link

answered 15 May '15, 17:19

Kaiser%20Ahmed's gravatar image

Kaiser Ahmed
3.2k522

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×15
×11

question asked: 15 May '15, 13:16

question was seen: 1,008 times

last updated: 15 May '15, 17:19