0

Wap to find out greater between two numbers

With declaration and return value

11th Jan 2022, 2:56 PM
Barshu
Barshu - avatar
8 odpowiedzi
0
Barshu oh. I know but tell me how you are trying? Just wrap this in a function : int greater(int a, int b) { int big=0; //add logic to find big, that you know.. if (a>b) big = a; else big = b; return big; }
12th Jan 2022, 12:59 PM
Jayakrishna 🇮🇳
+ 2
@Barshu Try yourself first and post your attempt, if unsolved... Happy learning..
11th Jan 2022, 8:01 PM
Jayakrishna 🇮🇳
+ 2
Jayakrishna🇮🇳 I tried but I can't solve it please post your ans 🥺
12th Jan 2022, 3:56 AM
Barshu
Barshu - avatar
+ 2
Are yarrrr I know this methodJayakrishna🇮🇳 I mention In question that with declaration and return value
12th Jan 2022, 12:37 PM
Barshu
Barshu - avatar
+ 1
12th Jan 2022, 1:04 PM
Barshu
Barshu - avatar
+ 1
I apply your logic but I solve it an another way And send it to my teacher Just wait a while I am also waiting for her response to my program
12th Jan 2022, 4:13 PM
Barshu
Barshu - avatar
0
If it solved, then may I see your total code..!? Anyways, hope it helped.. You're welcome... Barshu
12th Jan 2022, 4:10 PM
Jayakrishna 🇮🇳
- 1
No Problem. Barshu Post that try, so you may get where you did mistake... edit: simple way: if (a>b) printf("a big"); else printf("b big");
12th Jan 2022, 12:04 PM
Jayakrishna 🇮🇳