26/01/2020, 4:19 pm - Messages and calls are end-to-end encrypted. No one outside of this chat, not even WhatsApp, can read or listen to them. Tap to learn more. 24/01/2020, 8:25 pm - Tanay Kamath (TSEC, CS) created group "CODERS👨‍💻👩‍💻🖥💻" 26/01/2020, 4:19 pm - You joined using this group's invite link 26/01/2020, 4:20 pm - +91 99871 38558 joined using this group's invite link 26/01/2020, 4:20 pm - +91 91680 38866 joined using this group's invite link 26/01/2020, 4:21 pm - +91 72762 35231 joined using this group's invite link 26/01/2020, 4:22 pm - +91 88392 06534 joined using this group's invite link 26/01/2020, 4:23 pm - +91 98709 38217 joined using this group's invite link 26/01/2020, 4:23 pm - +91 98702 02065 joined using this group's invite link 26/01/2020, 4:23 pm - +91 91370 44426 joined using this group's invite link 26/01/2020, 4:25 pm - Pranav Dani joined using this group's invite link 26/01/2020, 4:25 pm - +91 79778 39093 joined using this group's invite link 26/01/2020, 4:25 pm - +91 98670 44401 joined using this group's invite link 26/01/2020, 4:26 pm - +91 84828 26061 joined using this group's invite link 26/01/2020, 4:26 pm - +91 96191 55044 joined using this group's invite link 26/01/2020, 4:26 pm - +91 99201 75875 joined using this group's invite link 26/01/2020, 4:29 pm - +91 87799 77656 joined using this group's invite link 26/01/2020, 4:29 pm - +91 91372 82638 joined using this group's invite link 26/01/2020, 4:30 pm - +91 75069 97789 joined using this group's invite link 26/01/2020, 4:31 pm - +91 98234 51436 joined using this group's invite link 26/01/2020, 4:32 pm - Chiraayu Praveen (TSEC, CS) joined using this group's invite link 26/01/2020, 4:36 pm - +91 98208 31051 joined using this group's invite link 26/01/2020, 4:37 pm - +91 99675 58551 joined using this group's invite link 26/01/2020, 4:38 pm - Ishneet (TSEC, CHEM) joined using this group's invite link 26/01/2020, 4:39 pm - Swaraj (TSEC, CS) joined using this group's invite link 26/01/2020, 4:39 pm - +91 99672 39663 joined using this group's invite link 26/01/2020, 4:45 pm - +91 88889 25915 joined using this group's invite link 26/01/2020, 4:46 pm - +91 79778 76844 joined using this group's invite link 26/01/2020, 4:47 pm - +91 82080 03744 joined using this group's invite link 26/01/2020, 4:49 pm - +91 98337 61116 joined using this group's invite link 26/01/2020, 4:51 pm - +91 75078 05454 joined using this group's invite link 26/01/2020, 4:53 pm - +91 86059 72817 joined using this group's invite link 26/01/2020, 4:57 pm - +91 90678 93300 joined using this group's invite link 26/01/2020, 4:58 pm - +91 97306 65646 joined using this group's invite link 26/01/2020, 5:00 pm - +91 88273 12155 joined using this group's invite link 26/01/2020, 5:01 pm - Shobit (TSEC, CS) joined using this group's invite link 26/01/2020, 5:02 pm - +91 90290 16010 joined using this group's invite link 26/01/2020, 5:03 pm - +91 97022 69539 joined using this group's invite link 26/01/2020, 5:04 pm - +91 91677 97590 joined using this group's invite link 26/01/2020, 5:06 pm - Kritanjali Jain (TSEC, CS) joined using this group's invite link 26/01/2020, 5:06 pm - +91 75064 59162 joined using this group's invite link 26/01/2020, 5:08 pm - +91 98212 97215 joined using this group's invite link 26/01/2020, 5:09 pm - +91 93242 72022 joined using this group's invite link 26/01/2020, 5:09 pm - +91 99692 93643 joined using this group's invite link 26/01/2020, 5:12 pm - +91 98923 74688 joined using this group's invite link 26/01/2020, 5:12 pm - +91 93728 12301 joined using this group's invite link 26/01/2020, 5:12 pm - +91 96536 93868 removed Saket (TSEC, CS) 26/01/2020, 5:12 pm - +91 75061 80036 joined using this group's invite link 26/01/2020, 5:13 pm - +91 96536 93868 added Saket (TSEC, CS) 26/01/2020, 5:14 pm - +91 88507 19064 joined using this group's invite link 26/01/2020, 5:17 pm - +91 97735 69400 joined using this group's invite link 26/01/2020, 5:20 pm - +91 96536 93868 left 26/01/2020, 5:22 pm - +91 99205 75511 joined using this group's invite link 26/01/2020, 5:23 pm - Hardik Raheja (TSEC, CS) joined using this group's invite link 26/01/2020, 5:23 pm - +91 77384 72938 joined using this group's invite link 26/01/2020, 5:25 pm - +91 77385 57601 joined using this group's invite link 26/01/2020, 5:25 pm - +91 79770 56210 joined using this group's invite link 26/01/2020, 5:25 pm - +91 90499 38860 joined using this group's invite link 26/01/2020, 5:25 pm - +91 80801 39870 joined using this group's invite link 26/01/2020, 5:26 pm - +91 96648 44643 joined using this group's invite link 26/01/2020, 5:28 pm - +91 96992 89993 joined using this group's invite link 26/01/2020, 5:28 pm - Parth Namdev joined using this group's invite link 26/01/2020, 5:29 pm - Riddhi Shah (TSEC, CS) joined using this group's invite link 26/01/2020, 5:30 pm - +91 84335 18102 joined using this group's invite link 26/01/2020, 5:34 pm - +91 88284 70904 joined using this group's invite link 26/01/2020, 5:38 pm - +91 96197 60216 joined using this group's invite link 26/01/2020, 5:40 pm - Chirag Sharma (TSEC, CS) joined using this group's invite link 26/01/2020, 5:44 pm - +91 88795 52797 joined using this group's invite link 26/01/2020, 5:45 pm - +91 83789 81107 joined using this group's invite link 26/01/2020, 5:46 pm - +91 6380 608 411 joined using this group's invite link 26/01/2020, 5:49 pm - Anushree (TSEC, CS) joined using this group's invite link 26/01/2020, 5:50 pm - +91 80820 81616 joined using this group's invite link 26/01/2020, 5:55 pm - Kavya Nair joined using this group's invite link 26/01/2020, 5:58 pm - +91 80979 26321 joined using this group's invite link 26/01/2020, 6:04 pm - +91 92842 87810 joined using this group's invite link 26/01/2020, 6:04 pm - +91 76208 56877 joined using this group's invite link 26/01/2020, 6:06 pm - +91 81696 22410 joined using this group's invite link 26/01/2020, 6:11 pm - +91 97308 52191 joined using this group's invite link 26/01/2020, 6:11 pm - +91 83690 21693 joined using this group's invite link 26/01/2020, 6:19 pm - +91 96194 00980 joined using this group's invite link 26/01/2020, 6:21 pm - +91 76667 91772 joined using this group's invite link 26/01/2020, 6:32 pm - Aneri Shah (TSEC, CS) joined using this group's invite link 26/01/2020, 6:43 pm - Parinda Pranami (TSEC, IT) joined using this group's invite link 26/01/2020, 7:01 pm - Shreya (TSEC, IT) joined using this group's invite link 26/01/2020, 7:06 pm - Mittul Dasani (TSEC, CS) joined using this group's invite link 26/01/2020, 7:12 pm - +91 83292 66084 joined using this group's invite link 26/01/2020, 7:12 pm - +91 87799 49518 joined using this group's invite link 26/01/2020, 7:27 pm - +91 70394 60876 joined using this group's invite link 26/01/2020, 7:39 pm - +91 90282 48673 joined using this group's invite link 26/01/2020, 7:41 pm - Pranay Thakur (TSEC, CS) joined using this group's invite link 26/01/2020, 7:49 pm - +91 96536 93868 joined using this group's invite link 26/01/2020, 7:50 pm - +91 79776 23387 joined using this group's invite link 26/01/2020, 8:11 pm - +91 95187 88109 joined using this group's invite link 26/01/2020, 8:14 pm - +91 94044 50783 joined using this group's invite link 26/01/2020, 8:21 pm - Mohammed (TSEC, EXTC) joined using this group's invite link 26/01/2020, 8:26 pm - +91 88792 49540 joined using this group's invite link 26/01/2020, 8:31 pm - +91 82375 09868 joined using this group's invite link 26/01/2020, 8:43 pm - +91 82080 02653 joined using this group's invite link 26/01/2020, 8:58 pm - +91 97697 60869 joined using this group's invite link 26/01/2020, 9:32 pm - +91 77568 95072 joined using this group's invite link 26/01/2020, 9:52 pm - Hamzah (TSEC, CS) joined using this group's invite link 26/01/2020, 10:03 pm - +91 98204 33166 joined using this group's invite link 26/01/2020, 10:23 pm - +91 96896 27597 joined using this group's invite link 26/01/2020, 11:15 pm - +91 88988 92174 joined using this group's invite link 26/01/2020, 11:21 pm - +91 98676 12302 joined using this group's invite link 26/01/2020, 11:56 pm - +91 99875 91581 joined using this group's invite link 27/01/2020, 12:05 am - Keyul Jain (TSEC, CS) joined using this group's invite link 27/01/2020, 6:23 am - +91 75064 86714 joined using this group's invite link 27/01/2020, 10:06 am - Prithvi Rohira (TSEC, CS) left 27/01/2020, 10:44 am - Chinmay Palav (TSEC, CS) joined using this group's invite link 27/01/2020, 1:39 pm - +91 72495 29889 joined using this group's invite link 27/01/2020, 4:16 pm - +91 88790 69347 joined using this group's invite link 27/01/2020, 4:34 pm - +91 99202 79905 joined using this group's invite link 27/01/2020, 7:31 pm - +91 96536 93868: 27/01/2020, 7:31 pm - +91 96536 93868: Give it a try .... 27/01/2020, 7:31 pm - Dheeraj Lalwani (TSEC, CS): Alright 27/01/2020, 7:32 pm - Dheeraj Lalwani (TSEC, CS): We can make this a trend 27/01/2020, 7:32 pm - +91 96536 93868: Sure 27/01/2020, 7:32 pm - Dheeraj Lalwani (TSEC, CS): Everyday a new challenge 27/01/2020, 7:43 pm - +91 99201 75875: More of logic or algo problems^ 27/01/2020, 7:43 pm - Dheeraj Lalwani (TSEC, CS): Yeah 27/01/2020, 7:44 pm - Dheeraj Lalwani (TSEC, CS): Something or the other So that we can build our problem solving skills 27/01/2020, 7:59 pm - +91 95949 08570: Nice idea 🤟 27/01/2020, 8:02 pm - +91 89833 85127 joined using this group's invite link 27/01/2020, 8:16 pm - +91 99696 99151 joined using this group's invite link 27/01/2020, 9:34 pm - +91 98206 14506 joined using this group's invite link 27/01/2020, 10:03 pm - Dheeraj Lalwani (TSEC, CS) changed the subject from "CODERS👨‍💻👩‍💻🖥💻" to "TSEC CODERS👨‍💻👩‍💻🖥💻" 27/01/2020, 8:37 pm - +91 96536 93868: We'll try posting our codes at 10 pm ... 27/01/2020, 10:05 pm - +91 82916 40581 joined using this group's invite link 27/01/2020, 8:39 pm - Dheeraj Lalwani (TSEC, CS): Alright 27/01/2020, 8:41 pm - Dheeraj Lalwani (TSEC, CS): Also Please note People genuinely interested in coding or Want to start coding only be in this group 27/01/2020, 9:19 pm - +91 79778 76844: Yes 27/01/2020, 9:19 pm - +91 90499 38860: Yup 27/01/2020, 9:41 pm - Tanay Kamath (TSEC, CS): Can we store * in a char variable? 27/01/2020, 9:42 pm - +91 95949 08570: Are you really thinking of just printing the pattern😂 27/01/2020, 9:42 pm - Tanay Kamath (TSEC, CS): Nope 27/01/2020, 9:42 pm - Tanay Kamath (TSEC, CS): Ofc not 27/01/2020, 9:42 pm - +91 95949 08570: Yes you can 27/01/2020, 9:42 pm - Tanay Kamath (TSEC, CS): Then why will I even store it in a variable 27/01/2020, 9:42 pm - +91 95949 08570: I think so 27/01/2020, 9:42 pm - Tanay Kamath (TSEC, CS): Ohk 27/01/2020, 9:46 pm - Saket (TSEC, CS): Yes you can but just use printf("*"); 27/01/2020, 9:48 pm - Tanay Kamath (TSEC, CS): Arre ik 27/01/2020, 9:49 pm - Tanay Kamath (TSEC, CS): Re 27/01/2020, 9:49 pm - Saket (TSEC, CS): Cool 27/01/2020, 10:00 pm - Dheeraj Lalwani (TSEC, CS): 27/01/2020, 10:00 pm - Dheeraj Lalwani (TSEC, CS): My soln in Python 27/01/2020, 10:01 pm - +91 95949 08570: Bruh😑 27/01/2020, 10:02 pm - Dheeraj Lalwani (TSEC, CS): Just check if correct or not 27/01/2020, 10:02 pm - Dheeraj Lalwani (TSEC, CS): Kya hua? 27/01/2020, 10:02 pm - +91 95949 08570: Yeah👍👌 27/01/2020, 10:02 pm - Ishneet (TSEC, CHEM) left 27/01/2020, 10:04 pm - +91 77568 95072: What would be the solution if the language is C ?? I mean we are learning so let's try going for it 27/01/2020, 10:04 pm - Rohit Pathak (TSEC, CS): This message was deleted 27/01/2020, 10:04 pm - Dheeraj Lalwani (TSEC, CS): Alright Actually, I was being lazy Thoda syntax strong nahi hai😅😂 27/01/2020, 10:05 pm - Rohit Pathak (TSEC, CS): This message was deleted 27/01/2020, 10:09 pm - Rohit Pathak (TSEC, CS): 27/01/2020, 10:09 pm - Dheeraj Lalwani (TSEC, CS): Thanks bhai 27/01/2020, 10:09 pm - Rohit Pathak (TSEC, CS): C soln 27/01/2020, 10:09 pm - +91 96536 93868: int main() { int n; cin>>n; for (int i=1;i<=n;i++){ for(int j=1;j<=n+1-i;j++){ cout<<"*"; } for (int k=1;k<=2*i-2;k++){ cout<<" "; } for(int j=1;j<=n+1-i;j++){ cout<<"*"; }cout< 27/01/2020, 10:11 pm - +91 96536 93868: Great !! Good use of if else ... 27/01/2020, 10:11 pm - +91 75078 05454: Thanks 27/01/2020, 10:12 pm - +91 77385 57601: This message was deleted 27/01/2020, 10:12 pm - +91 77385 57601: this is c++ 27/01/2020, 10:15 pm - Dheeraj Lalwani (TSEC, CS): Actually great 27/01/2020, 10:15 pm - +91 96536 93868: At our level the only difference between C and C++ is printf and scanf vala statement ....Rest is same .... 27/01/2020, 10:15 pm - Dheeraj Lalwani (TSEC, CS): Yes true 27/01/2020, 10:15 pm - +91 75078 05454: Yes 27/01/2020, 10:16 pm - Tanay Kamath (TSEC, CS): 27/01/2020, 10:16 pm - +91 96536 93868: C is only restricted to functions ..While c++has classes and structures vala stuff 27/01/2020, 10:16 pm - Tanay Kamath (TSEC, CS): 27/01/2020, 10:16 pm - Tanay Kamath (TSEC, CS): Just check my soln out 27/01/2020, 10:16 pm - Dheeraj Lalwani (TSEC, CS): Yup 27/01/2020, 10:16 pm - Tanay Kamath (TSEC, CS): I got a bit confused... 27/01/2020, 10:29 pm - Tanay Kamath (TSEC, CS): I think char b=32 instead 27/01/2020, 10:34 pm - +91 77385 57601: #include #include void main() { int i, j, l; l = 5; for (i = 0; i < 5; i++) { for (j = 0; j < l; j++) { printf("* "); } for (j = 0; j < 4 * i; j++) { printf(" "); } for (j = 0; j < l; j++) { printf("* "); } l--; printf("\n"); } l = 0; for (i = 0; i < 5; i++) { for (j = l; j >= 0; j--) { printf("* "); } for (j = 4 * (5 - i) - 4; j > 0; j--) { printf(" "); } for (j = l; j >= 0; j--) { printf("* "); } l++; printf("\n"); } } 27/01/2020, 10:35 pm - +91 77385 57601: you can ignore l=0; in second part 27/01/2020, 10:42 pm - +91 96536 93868: Your code is static bro ... there must be an input ... 27/01/2020, 10:44 pm - Dheeraj Lalwani (TSEC, CS): Guys... Need your opinion Should we consider complexity analysis at this stage where most of us are beginners? Reply with "✅" for yes And "❌" for no 27/01/2020, 10:45 pm - +91 77385 57601: Actually haa re but i thought ki sirf normal wala he karte hai 27/01/2020, 11:00 pm - Tanay Kamath (TSEC, CS): Like? 27/01/2020, 11:00 pm - +91 79774 68083: This message was deleted 27/01/2020, 11:00 pm - +91 79774 68083: This message was deleted 27/01/2020, 11:05 pm - +91 70394 60876: Why have you used so many variables 27/01/2020, 11:06 pm - +91 79774 68083: Because I divided the code in 2 parts! 27/01/2020, 11:06 pm - +91 70394 60876: Still 3 were enough 27/01/2020, 11:07 pm - +91 79774 68083: Yeah 27/01/2020, 11:07 pm - +91 70394 60876: Can you DM your code 27/01/2020, 11:23 pm - +91 96191 55044: 27/01/2020, 11:23 pm - +91 96191 55044: This is my approach 27/01/2020, 11:23 pm - +91 90678 93300: 27/01/2020, 11:46 pm - +91 70394 60876: 27/01/2020, 11:46 pm - +91 70394 60876: 27/01/2020, 11:46 pm - +91 70394 60876: 28/01/2020, 12:07 am - Mohit Varma (TSEC, CS): Guys...I am sure most of you are damn awesome coders but if you can solve the problem with basic level first , i am sure it will be helpful for people like me who has a very little knowledge of codings! Thanks anyway! 28/01/2020, 12:14 am - Dheeraj Lalwani (TSEC, CS): 👍🏻👍🏻👍🏻 28/01/2020, 12:58 am - Tanay Kamath (TSEC, CS): This message was deleted 28/01/2020, 12:58 am - Tanay Kamath (TSEC, CS): This message was deleted 28/01/2020, 12:59 am - Tanay Kamath (TSEC, CS): This message was deleted 28/01/2020, 12:59 am - Tanay Kamath (TSEC, CS): This message was deleted 28/01/2020, 1:00 am - Tanay Kamath (TSEC, CS): Created Another soln bcoz my previous wasn giving problems(not printing spaces) 28/01/2020, 1:04 am - +91 70394 60876: 👍 28/01/2020, 1:04 am - +91 77385 57601: Guys rather than spending pictures send doc or direct code here 28/01/2020, 1:04 am - +91 77385 57601: Coz it will some take a lot of space in your phones 28/01/2020, 1:21 am - Tanay Kamath (TSEC, CS): 28/01/2020, 1:21 am - Tanay Kamath (TSEC, CS): Here 28/01/2020, 1:22 am - Tanay Kamath (TSEC, CS): I generalized the code too 28/01/2020, 1:22 am - Tanay Kamath (TSEC, CS): Hence this is the most appropriate 28/01/2020, 1:22 am - +91 70394 60876: Can anyone send the list of codes to be done in C this sem 28/01/2020, 1:22 am - Tanay Kamath (TSEC, CS): 🤨 28/01/2020, 1:22 am - Tanay Kamath (TSEC, CS): Dude practice as much problems as possible 28/01/2020, 1:23 am - Tanay Kamath (TSEC, CS): We are here to be better and better in coding 28/01/2020, 1:23 am - Tanay Kamath (TSEC, CS): We are not confined to any syllabus 28/01/2020, 1:24 am - +91 70394 60876: Yes I just want to go through the PDF that someone had send earlier 28/01/2020, 1:24 am - Tanay Kamath (TSEC, CS): Oh 28/01/2020, 1:26 am - Tanay Kamath (TSEC, CS): 28/01/2020, 1:26 am - Tanay Kamath (TSEC, CS): I think this is it 28/01/2020, 1:27 am - +91 70394 60876: Yes this one it is, thanks 28/01/2020, 8:43 am - +91 96536 93868 added +91 78758 66747 28/01/2020, 9:26 am - +91 81692 06054 joined using this group's invite link 28/01/2020, 10:17 am - Tanay Kamath (TSEC, CS): 28/01/2020, 10:17 am - Tanay Kamath (TSEC, CS): Can any1 plz send soln for this problem 28/01/2020, 10:49 am - +91 75078 05454: Send the link please 28/01/2020, 10:53 am - +91 79770 56210: # include void main() { for(int i=5; i>=-5; i--) { int t=abs(i); for(int j=1; j<=t; j++) printf("*"); for(int j=1; j<=(5-t)*2; j++) printf(" "); for(int j=t+1; j<=2*t ;j++) printf("*"); printf("\n"); } } 28/01/2020, 10:53 am - +91 79770 56210: This'll also do for that hollow diamond prog in c 28/01/2020, 10:54 am - Tanay Kamath (TSEC, CS): Guys send code if possible for this problem 28/01/2020, 11:02 am - +91 99300 15135 joined using this group's invite link 28/01/2020, 12:49 pm - Vivek (TSEC, CS) joined using this group's invite link 28/01/2020, 3:19 pm - +91 77385 57601: Y u used abs?? 28/01/2020, 3:21 pm - +91 93728 12301 left 28/01/2020, 3:52 pm - +91 79770 56210: Cause if the numbers are left -ve then neeche ka output proper nai ayega 28/01/2020, 3:53 pm - +91 79770 56210: I am running for loop from 5 to -5 so same forloop for both the upper and lower parts are used thats why this method is short 28/01/2020, 3:55 pm - +91 77385 57601: Nice approach 28/01/2020, 3:57 pm - +91 79770 56210: 👍🏻✌ 28/01/2020, 4:01 pm - Dheeraj Lalwani (TSEC, CS) added +91 77000 27264 28/01/2020, 4:02 pm - +91 98203 28912 joined using this group's invite link 28/01/2020, 4:44 pm - Saket (TSEC, CS) added Prithvi Rohira (TSEC, CS) 28/01/2020, 6:49 pm - +91 96536 93868: What will be the output of the C program by considering 'b' as a User input? #include int main() { int i = 1, j = 1; for(--i && j++ ; i<10; i+=2) { printf("loop "); } return 0; } 28/01/2020, 6:52 pm - Chirag Sharma (TSEC, CS): 28/01/2020, 6:52 pm - Chirag Sharma (TSEC, CS): In this program why do we get output of i uptill 10 28/01/2020, 6:57 pm - Tanay Kamath (TSEC, CS): More than 2 test conditions🤨 28/01/2020, 6:57 pm - Tanay Kamath (TSEC, CS): Is it allowed!? 28/01/2020, 6:57 pm - Tanay Kamath (TSEC, CS): Compile it and send the o/p 28/01/2020, 6:58 pm - Chirag Sharma (TSEC, CS): I saw a youtube video. 28/01/2020, 6:58 pm - Chirag Sharma (TSEC, CS): It does generate output 28/01/2020, 6:59 pm - Tanay Kamath (TSEC, CS): Bcoz its a wrong program 28/01/2020, 6:59 pm - Tanay Kamath (TSEC, CS): This message was deleted 28/01/2020, 6:59 pm - Chirag Sharma (TSEC, CS): Huh? 28/01/2020, 6:59 pm - Tanay Kamath (TSEC, CS): Compile it 28/01/2020, 6:59 pm - Tanay Kamath (TSEC, CS): Ig 28/01/2020, 6:59 pm - Chirag Sharma (TSEC, CS): Are bol raha hu this gives an output. No error 28/01/2020, 7:00 pm - Chirag Sharma (TSEC, CS): I don't have a pc/laptop rn 28/01/2020, 7:00 pm - Tanay Kamath (TSEC, CS): Then @918247578176 sir aap batao 28/01/2020, 7:00 pm - Tanay Kamath (TSEC, CS): @918247578176 28/01/2020, 7:04 pm - +91 96536 93868: both the condition must be satisfied simultaneously ....so it cannot go beyond 5 bro..... 28/01/2020, 7:04 pm - Saket (TSEC, CS): Yaa. 28/01/2020, 7:05 pm - +91 77385 57601: Yes it's allowed 28/01/2020, 7:05 pm - Tanay Kamath (TSEC, CS): Ohk👍 28/01/2020, 7:05 pm - Tanay Kamath (TSEC, CS): Learned something new 28/01/2020, 7:05 pm - +91 75078 05454: This message was deleted 28/01/2020, 7:07 pm - Saket (TSEC, CS): But I think the first statement in the for loop i.e(Before semi-colon)is for intialization ?? 28/01/2020, 7:08 pm - Saket (TSEC, CS): We can add multiple conditions in the last blocks! 28/01/2020, 7:08 pm - Saket (TSEC, CS): Block* 28/01/2020, 7:08 pm - +91 79770 56210: Ha usne increment kiya hai voh bhi kar sakte hai initialization ke jagah pe ig 28/01/2020, 7:09 pm - Saket (TSEC, CS): Are u sure? 28/01/2020, 7:10 pm - +91 79770 56210: Ha cause kisiko output aa rah tha na? 28/01/2020, 7:10 pm - Saket (TSEC, CS): I see 28/01/2020, 7:10 pm - Dheeraj Lalwani (TSEC, CS): @918247578176 Aaj ka challenge bhej na plz 28/01/2020, 7:11 pm - Saket (TSEC, CS): Wait 28/01/2020, 7:11 pm - Dheeraj Lalwani (TSEC, CS): Ok 28/01/2020, 7:12 pm - Tanay Kamath (TSEC, CS): 28/01/2020, 7:12 pm - +91 77385 57601: . 28/01/2020, 7:12 pm - Tanay Kamath (TSEC, CS): Comma operator a small and imp note 28/01/2020, 7:13 pm - Tanay Kamath (TSEC, CS): Do read 28/01/2020, 7:13 pm - Tanay Kamath (TSEC, CS): I had forgotten this 28/01/2020, 7:17 pm - Tanay Kamath (TSEC, CS): State the o/p for this code snippet: int var =(printf("%s\n","Hello"),5); printf("%d",var); 28/01/2020, 7:22 pm - Dheeraj Lalwani (TSEC, CS): 5? 28/01/2020, 7:22 pm - Tanay Kamath (TSEC, CS): Its Hello! 5 28/01/2020, 7:22 pm - Dheeraj Lalwani (TSEC, CS): Oh ya 28/01/2020, 7:22 pm - Dheeraj Lalwani (TSEC, CS): Got it 28/01/2020, 7:22 pm - Tanay Kamath (TSEC, CS): Its : Hello! 5 28/01/2020, 7:23 pm - Dheeraj Lalwani (TSEC, CS): Without the exclamation mark 28/01/2020, 7:23 pm - Dheeraj Lalwani (TSEC, CS): There's no exclamation mark 28/01/2020, 7:23 pm - Tanay Kamath (TSEC, CS): Haan sorry 28/01/2020, 7:24 pm - Tanay Kamath (TSEC, CS): Hello 5 28/01/2020, 7:24 pm - Dheeraj Lalwani (TSEC, CS): 👍🏻 28/01/2020, 7:24 pm - Vivek Iyer (TSEC, Biomed): Actually condn will i>5 28/01/2020, 7:24 pm - Tanay Kamath (TSEC, CS): printf function always returns a value equal to no of characters it prints 28/01/2020, 7:24 pm - Vivek Iyer (TSEC, Biomed): I=I+1 28/01/2020, 7:25 pm - Saket (TSEC, CS): Guys today's q. 28/01/2020, 7:25 pm - Saket (TSEC, CS): All the elements of the input array will be consisting of '0' s and '1' s. You have to output a single line With all the 1's and then remaining 0's of the input array. Input format : Take n,After that next line contains, n spaced integers i.e a1,a2...an denoting the elements of the array. Output format : Print a single line consisting of length n. Sample input: 6 0 1 0 1 0 1 Sample output: 1 1 1 0 0 0 Explaination : As we can see there are 3 ones and 3 zeros in the input array,So output is accordingly. 28/01/2020, 7:29 pm - Tanay Kamath (TSEC, CS): Just a note 28/01/2020, 7:29 pm - Tanay Kamath (TSEC, CS): Haan will try 28/01/2020, 7:29 pm - Chirag Sharma (TSEC, CS): . 28/01/2020, 7:30 pm - Chirag Sharma (TSEC, CS): Just someone run this on your pc/laptop 28/01/2020, 7:30 pm - Chirag Sharma (TSEC, CS): And please explain the output 28/01/2020, 7:30 pm - Tanay Kamath (TSEC, CS): Yes Plz 28/01/2020, 7:30 pm - Chirag Sharma (TSEC, CS): It has something to do with how second condition of B is placed. 28/01/2020, 7:30 pm - +91 99201 75875: Assuming you're not supposed to used in built sort functions right? 28/01/2020, 7:30 pm - Chirag Sharma (TSEC, CS): Because if you reverse it. Write k first and then i 28/01/2020, 7:31 pm - Chirag Sharma (TSEC, CS): You get a totally different output 28/01/2020, 7:31 pm - Chirag Sharma (TSEC, CS): How??? 28/01/2020, 7:39 pm - Tushar Nankani: Can you send the complete code? What is in the second printf? 28/01/2020, 7:41 pm - Chirag Sharma (TSEC, CS): https://youtu.be/AU7mADJMa9Y 28/01/2020, 7:43 pm - +91 77385 57601: 28/01/2020, 7:47 pm - Saket (TSEC, CS): No.Don't use any built functions. 28/01/2020, 7:47 pm - Saket (TSEC, CS): In-built 28/01/2020, 7:48 pm - Tushar Nankani: Because it enters the loop because of k. And i gets printed too. 28/01/2020, 7:49 pm - Tushar Nankani: The condition of k becomes true and therefore it enters the loop. From 2 to 20 with a gap of 2. Therefore it enters 10 times and i gets printed instead from 1-10 28/01/2020, 7:50 pm - Saket (TSEC, CS): So conclusion is If there are multiple conditions in a single ' for loop' then even if one statement is satisfied then loop will run for that condition. 28/01/2020, 7:51 pm - Tushar Nankani: Yes. It's like any one of these conditions should be true. It's like using "OR". And not "AND". 28/01/2020, 7:51 pm - Dheeraj Lalwani (TSEC, CS): But depends na Conditions ke middle me and hai ya or 28/01/2020, 7:52 pm - Dheeraj Lalwani (TSEC, CS): 👍🏻👍🏻 28/01/2020, 7:52 pm - Dheeraj Lalwani (TSEC, CS): Guys One more thing We've gotta manage our academics also along with coding I know pointers don't matter much But getting a decent pointer is important..... If you all can You'll should allocate specific time for coding.... And plan day accordingly 28/01/2020, 7:53 pm - Vivek Iyer (TSEC, Biomed): 👍🏻👍🏻 28/01/2020, 7:53 pm - +91 75061 80036 left 28/01/2020, 7:53 pm - Tanay Kamath (TSEC, CS): Ty👍 28/01/2020, 7:54 pm - Tanay Kamath (TSEC, CS): Yes 28/01/2020, 7:54 pm - Tanay Kamath (TSEC, CS): So which theory books are you guys using? 28/01/2020, 8:01 pm - +91 81696 22410: This message was deleted 29/01/2020, 12:26 am - +91 99201 75875: 29/01/2020, 9:33 am - Saket (TSEC, CS): 👍🏻 29/01/2020, 9:48 am - +91 97698 67348 joined using this group's invite link 29/01/2020, 12:38 pm - +91 96536 93868 added +91 90820 98830 29/01/2020, 12:50 pm - Saket (TSEC, CS): int main() { int n; cin>>n; int a[n]; for(int i=0;i>a[i]; } int flag=0; for(int i=0;i 29/01/2020, 8:10 pm - +91 78758 66747: 29/01/2020, 8:11 pm - +91 96536 93868: int n; cin>>n; int orgn=n; //storing the original number int sqr=n*n; //square of the number int digits=0; //length of the number entered while(n>0){ n=n/10; digits++; } int ten=1; //deciding the multiple of 10 for(int i=1;i<=digits;i++){ ten=ten*10; } int num=sqr%ten; if(num==orgn){ cout<<"the number is automorphic"; }else{ cout<<"not an automorphic number"; } 29/01/2020, 8:12 pm - +91 96536 93868: my code has so many variables ...it might me difficult to understand... 29/01/2020, 8:12 pm - Tanay Kamath (TSEC, CS): 👍 29/01/2020, 8:13 pm - Tanay Kamath (TSEC, CS): 👍 29/01/2020, 8:14 pm - Tanay Kamath (TSEC, CS): See the above solns for digits counting 29/01/2020, 8:17 pm - +91 96191 55044: 29/01/2020, 8:20 pm - Varun Mamtora (TSEC, CS): 29/01/2020, 8:20 pm - Varun Mamtora (TSEC, CS): haan got it 29/01/2020, 8:20 pm - Tanay Kamath (TSEC, CS): This message was deleted 29/01/2020, 8:21 pm - Tanay Kamath (TSEC, CS): ✌ 29/01/2020, 8:21 pm - +91 79774 68083: This message was deleted 29/01/2020, 8:21 pm - +91 79774 68083: This message was deleted 29/01/2020, 8:21 pm - Varun Mamtora (TSEC, CS): lol its automorphic my bad i have written autophoric😂😂 29/01/2020, 8:22 pm - Varun Mamtora (TSEC, CS): ignore the comments🥺 29/01/2020, 8:24 pm - Tanay Kamath (TSEC, CS): Your logic is very complex,just check if it does run on a compiler 29/01/2020, 8:24 pm - Tanay Kamath (TSEC, CS): I will dry run it later 29/01/2020, 8:26 pm - +91 79774 68083: 29/01/2020, 8:26 pm - +91 79774 68083: 29/01/2020, 8:33 pm - Saket (TSEC, CS): Instead of using a for loop to calculate the divisor (i.e. ''ten") you can Do num==sqr%pow(10,digits); 29/01/2020, 8:33 pm - +91 77385 57601: #include #include int main() { int no, sq, i, k, count, lastsq, ten; count = 0; for (no = 0; no <= 100; no++) { lastsq = 0; sq = no * no; k = no; count = 0; ten = 1; while (k > 0) { count++; k = k / 10; } for (i = 0; i < count; i++) { ten = ten * 10; } lastsq = sq % ten; if (lastsq == no) { printf("%d\n", no); } } return 0; } 29/01/2020, 8:34 pm - Varun Mamtora (TSEC, CS): broooo this things not working 29/01/2020, 8:34 pm - Varun Mamtora (TSEC, CS): i did the same 29/01/2020, 8:34 pm - Varun Mamtora (TSEC, CS): % yeh wale operator ke saath nai hota hai 29/01/2020, 8:35 pm - Saket (TSEC, CS): This message was deleted 29/01/2020, 8:35 pm - Varun Mamtora (TSEC, CS): matlab u have to declare a separate variable first like int x=pow(10,digits); num==sqr%x; 29/01/2020, 8:35 pm - Varun Mamtora (TSEC, CS): 😂😂 29/01/2020, 8:35 pm - Saket (TSEC, CS): Haa bus perfect 29/01/2020, 8:35 pm - Varun Mamtora (TSEC, CS): yea👍🏻 29/01/2020, 8:41 pm - +91 96191 55044: It ran on codeblocks. 29/01/2020, 8:57 pm - Tanay Kamath (TSEC, CS): Yes this makes it even shorter👍 29/01/2020, 8:58 pm - Tanay Kamath (TSEC, CS): 👍 29/01/2020, 9:22 pm - +91 96191 55044: This message was deleted 29/01/2020, 9:43 pm - +91 79770 56210: Ha because pow( ) gives u float value and modulus operator takes an integer at its right side so just write (int) before pow( ) 29/01/2020, 9:50 pm - Varun Mamtora (TSEC, CS): accha.... thanks for sharing👍🏻 29/01/2020, 9:55 pm - +91 79770 56210: But type conversion me 100.00 ka 99 ho ja rah hai🤔 29/01/2020, 9:55 pm - Tanay Kamath (TSEC, CS): Yes 29/01/2020, 9:56 pm - Tanay Kamath (TSEC, CS): What was the statement exactly? 29/01/2020, 9:56 pm - +91 79770 56210: 29/01/2020, 9:56 pm - +91 79770 56210: 29/01/2020, 9:57 pm - Tanay Kamath (TSEC, CS): 🤔 29/01/2020, 9:58 pm - Tanay Kamath (TSEC, CS): Try storing in a variable and then print maybe 29/01/2020, 10:00 pm - +91 79770 56210: 29/01/2020, 10:16 pm - +91 96536 93868: Since pow function gives float value ...10 ^2 can be stored as 99.999 or 100.0001 . When u write int it takes 99 in some compilers while 100 in some others 29/01/2020, 10:24 pm - Varun Mamtora (TSEC, CS): bro ek question hai 29/01/2020, 10:24 pm - Varun Mamtora (TSEC, CS): tune math.h library ko import nai kia na? 29/01/2020, 10:28 pm - Varun Mamtora (TSEC, CS): infact mere hisaab se undeclared indentifier ka error bhi pop up hona chaiye tha but run horaha hai🤯🤯 29/01/2020, 10:47 pm - Saket (TSEC, CS): This is because 52 (i.e. 25) might be stored as 24.9999999 or 25.0000000001 because the return type is double. When assigned to int, 25.0000000001 becomes 25 but 24.9999999 will give output 24. To overcome this and output the accurate answer in integer format, we can add 0.5 to the result and typecast it to int e.g (int)(pow(5, 2)+0.5) will give the correct answer(25, in above example), irrespective of the compiler. 29/01/2020, 10:47 pm - +91 79770 56210: Nai! 29/01/2020, 10:47 pm - Saket (TSEC, CS): I h'v read it on some blog 29/01/2020, 10:48 pm - +91 79770 56210: Ohk 29/01/2020, 10:48 pm - Dheeraj Lalwani (TSEC, CS): Bro... This I did not know before. 29/01/2020, 10:49 pm - Varun Mamtora (TSEC, CS): nice 29/01/2020, 10:50 pm - Saket (TSEC, CS): ✌Guys Even I got to know today 29/01/2020, 10:50 pm - Saket (TSEC, CS): itself 29/01/2020, 10:50 pm - +91 79770 56210: If you put the double in a variable and then store it in other variable after typescasting then it works! Like, x=pow(...); y=(int)x; 29/01/2020, 10:51 pm - Ankit (TSEC, CS): 29/01/2020, 10:53 pm - +91 79770 56210: Ig because usne s.trim kiya hai but he didnt store it in s so s remains the same 29/01/2020, 10:53 pm - Dheeraj Lalwani (TSEC, CS): What app is that? 29/01/2020, 10:54 pm - +91 79770 56210: Instagram 29/01/2020, 10:54 pm - Tushar Nankani: Instagram. 29/01/2020, 10:54 pm - Dheeraj Lalwani (TSEC, CS): 😅 29/01/2020, 10:54 pm - Ankit (TSEC, CS): tsecmemes pg pe tha 29/01/2020, 10:54 pm - Dheeraj Lalwani (TSEC, CS): Ok 29/01/2020, 10:55 pm - Varun Mamtora (TSEC, CS): yea u are right mostly 29/01/2020, 10:56 pm - Saket (TSEC, CS): for 24.9999999 when you typecast it into int then it will be roundoff to 24 but if you add 0.5 you will be safe even if it's 25.000000001 29/01/2020, 10:57 pm - +91 79770 56210: Hmmm 29/01/2020, 11:10 pm - +91 99201 75875: 29/01/2020, 11:15 pm - +91 77385 57601: Nice👍👍 29/01/2020, 11:16 pm - +91 79770 56210: 👍🏻👍🏻 29/01/2020, 11:17 pm - +91 79770 56210: Nice Dont even hv to count the digits!! 29/01/2020, 11:27 pm - Saket (TSEC, CS): Can u explain why your using that cin.get(); At line no. 21 29/01/2020, 11:29 pm - +91 99201 75875: This message was deleted 29/01/2020, 11:29 pm - +91 99201 75875: It's a replacement for return 0 Return 0 terminates the program cin.get() waits for the user to press a key (like Enter) before terminating the program 29/01/2020, 11:30 pm - +91 97698 79449 left 29/01/2020, 11:30 pm - Saket (TSEC, CS): Cool 29/01/2020, 11:30 pm - Tanay Kamath (TSEC, CS): Like getch? 29/01/2020, 11:33 pm - Tanay Kamath (TSEC, CS): Wow 29/01/2020, 11:35 pm - Tanay Kamath (TSEC, CS): But if we take output using double then why it gives 25.000000 @918247578176 !? 29/01/2020, 11:35 pm - Tanay Kamath (TSEC, CS): It should give 24.999999 29/01/2020, 11:36 pm - +91 99201 75875: getch is not part of the std library and is more turbo c++ specific tbh Not really sure but there is a difference between getch and cin.get() 29/01/2020, 11:36 pm - Tanay Kamath (TSEC, CS): Ohk 29/01/2020, 11:36 pm - Tanay Kamath (TSEC, CS): 👍 29/01/2020, 11:40 pm - Tanay Kamath (TSEC, CS): Superb logic👍 29/01/2020, 11:43 pm - Tanay Kamath (TSEC, CS): darshan sir told us to avoid statements like break if possible since it causes halt in the flow of the program abruptly and causes voltage fluctuations (just telling this to you),so just keep that in mind 29/01/2020, 11:43 pm - Tanay Kamath (TSEC, CS): Otherwise logic is excellent 29/01/2020, 11:44 pm - +91 99201 75875: Break is a really really common statement and is present in all programs Sir might've said cause turbo C might not be able to handle it 29/01/2020, 11:45 pm - Tanay Kamath (TSEC, CS): No in Ubuntu 29/01/2020, 11:45 pm - Tanay Kamath (TSEC, CS): Ig 29/01/2020, 11:45 pm - Tanay Kamath (TSEC, CS): Ik this 29/01/2020, 11:45 pm - +91 99201 75875: This is Visual Studio It's way more powerful than turbo c 29/01/2020, 11:45 pm - Tanay Kamath (TSEC, CS): I too have a habit of usi g 29/01/2020, 11:45 pm - +91 99201 75875: Ya but the ide is still turbo c 29/01/2020, 11:45 pm - Tanay Kamath (TSEC, CS): It was some other editor 29/01/2020, 11:46 pm - Tushar Nankani: It was a normal text editor. And we used terminal for execution. 29/01/2020, 11:46 pm - Tanay Kamath (TSEC, CS): Oh 29/01/2020, 11:48 pm - +91 99201 75875: Let's say this is true then you could use the same logic and instead of writing it in main(), make a separate function which just returned a Boolean and in the if statement replace break with return false and return true if the entire loop executes And in main just call the function with the user input int 29/01/2020, 11:49 pm - Tanay Kamath (TSEC, CS): 👍 30/01/2020, 9:30 am - Dheeraj Lalwani (TSEC, CS) added +91 91670 43943 30/01/2020, 9:28 am - Kavya Nair: Nidhi 2 TSEC IT.vcf (file attached) 30/01/2020, 9:29 am - Kavya Nair: Can someone pls add her to the group?👆🏻 30/01/2020, 9:30 am - Dheeraj Lalwani (TSEC, CS): Done 30/01/2020, 9:30 am - Kavya Nair: Thanks 30/01/2020, 1:02 pm - Saket (TSEC, CS) added +91 77180 43697 30/01/2020, 1:57 pm - Tanay Kamath (TSEC, CS) changed this group's settings to allow only admins to edit this group's info 30/01/2020, 6:14 pm - +91 77385 57601: Aaj ka sawal?? 30/01/2020, 6:56 pm - Tanay Kamath (TSEC, CS): @918451904417 aaj aap post karo 30/01/2020, 7:39 pm - Tushar Nankani: You deleted this message 30/01/2020, 8:27 pm - Rohit Pathak (TSEC, CS): 30/01/2020, 8:27 pm - Rohit Pathak (TSEC, CS): Try this out 30/01/2020, 8:43 pm - Dheeraj Lalwani (TSEC, CS): This is an amazing problem 30/01/2020, 8:44 pm - Dheeraj Lalwani (TSEC, CS): Try it 30/01/2020, 9:54 pm - Tanay Kamath (TSEC, CS): Yes will try 30/01/2020, 10:21 pm - +91 99201 75875: 30/01/2020, 10:24 pm - +91 96536 93868: int main(){ int n; cin>>n; string s; cin>>s; int v,sealvl=0; for (int i=0;i #include void main() { int n, sealev = 0, vall = 0; char terrain[100]; printf("Enter the no of hike:"); scanf("%d", &n); printf("\nEnter the terrain:"); scanf("%s", terrain); //printf("%d",strlen(terrain)); if (strlen(terrain) == n) { for (int i = 0; i < strlen(terrain); i++) { if ((terrain[i] == 'U' || terrain[i] == 'u') && (terrain[i] != 'D' || terrain[i] == 'd')) { sealev++; } else { sealev--; } if (sealev == 0&&(terrain[i]=='U' || terrain[i]=='u')) vall++; } printf("\nNo of valleys=%d", vall); } else printf("\inpt err"); } 31/01/2020, 1:14 am - Varun Mamtora (TSEC, CS): plis test this and tell? 31/01/2020, 9:20 am - Saket (TSEC, CS): Bro it's not correct because of the char array.Just see the constraints.. 31/01/2020, 9:21 am - Saket (TSEC, CS): Arey Bhai 31/01/2020, 10:18 am - Varun Mamtora (TSEC, CS): #include #include void main() { int n, sealev = 0, vall = 0; char terrain[1000000]; printf("Enter the no of hike:"); scanf("%d", &n); printf("\nEnter the terrain:"); scanf("%s", terrain); //printf("%d",strlen(terrain)); if (strlen(terrain) == n) { for (int i = 0; i < strlen(terrain); i++) { if (terrain[i] == 'U' && terrain[i] != 'D') { sealev++; } else { sealev--; } if (sealev == 0 && terrain[i] == 'U') vall++; } printf("\nNo of valleys=%d", vall); } else printf("\inpt err"); } 31/01/2020, 10:18 am - Varun Mamtora (TSEC, CS): ok now ig 31/01/2020, 1:56 pm - Tanay Kamath (TSEC, CS): Guys I wrote a code for this but it is giving output as 2 31/01/2020, 1:56 pm - Tanay Kamath (TSEC, CS): 31/01/2020, 1:57 pm - Tanay Kamath (TSEC, CS): If possible can anyone of you point out the logical mistake I made in this code? 31/01/2020, 5:52 pm - +91 76663 28147 joined using this group's invite link 01/02/2020, 9:48 am - +91 96536 93868: *Todays Challenge* At the annual meeting of Board of Directors of Acme Inc, every one starts shaking hands with everyone else in the room. Given the fact that any two persons shake hand exactly once, Can you tell the total count of handshakes? Input Format The first line contains the number of test cases T, T lines follow. Each line then contains an integer N, the total number of Board of Directors of Acme. Output Format Print the number of handshakes for each test-case in a new line. Constraints 1 <= T <= 1000 0 < N < 10 Sample Input 2 1 2 Sample Output 0 1 Explanation Case 1 : The lonely board member shakes no hands, hence 0. Case 2 : There are 2 board members, 1 handshake takes place. 01/02/2020, 11:34 am - Tanay Kamath (TSEC, CS): In the sample input what does the first 2 mean?, 01/02/2020, 11:34 am - Tanay Kamath (TSEC, CS): @919653693868 01/02/2020, 11:35 am - +91 76663 28147: This message was deleted 01/02/2020, 11:35 am - +91 96536 93868: the first integer is the number of test cases 01/02/2020, 11:36 am - Tanay Kamath (TSEC, CS): What does that mean?I mean I'm not getting it clear ? 01/02/2020, 11:36 am - +91 99201 75875: The number of time your code should run basically 01/02/2020, 11:36 am - Tanay Kamath (TSEC, CS): Is each test case the no of directors? 01/02/2020, 11:36 am - +91 99201 75875: For different values of number of board members 01/02/2020, 11:37 am - +91 96536 93868: yes... 01/02/2020, 11:37 am - Tanay Kamath (TSEC, CS): Ohk 01/02/2020, 12:30 pm - Tanay Kamath (TSEC, CS): 01/02/2020, 12:30 pm - Tanay Kamath (TSEC, CS): 01/02/2020, 12:30 pm - Tanay Kamath (TSEC, CS): 01/02/2020, 12:31 pm - Tanay Kamath (TSEC, CS): 01/02/2020, 12:31 pm - Tanay Kamath (TSEC, CS): Is the code correct @919653693868 ? 01/02/2020, 12:33 pm - +91 96536 93868: Send ur code in texted form ...So that I can check whether it passes all test cases ... 01/02/2020, 12:33 pm - Tanay Kamath (TSEC, CS): Ohk 01/02/2020, 12:33 pm - Tanay Kamath (TSEC, CS): Wait 01/02/2020, 12:36 pm - Tanay Kamath (TSEC, CS): #include #include #include int fact(int); int main() { int n; scanf("%d",&n); int t[n],h[n]; int i; for(i=0;i=2) { h[i]=((fact(n))/(fact(n-2)*2)); } else { h[i]=0; } } for(i=0;i 01/02/2020, 12:46 pm - Tanay Kamath (TSEC, CS): Similarly 5C2 is 10 01/02/2020, 12:46 pm - Tanay Kamath (TSEC, CS): Logic is correct ig 01/02/2020, 12:47 pm - Tanay Kamath (TSEC, CS): #include #include #include int fact(int); int main() { int n; scanf("%d",&n); int t[n],h[n]; int i; for(i=0;i=2) { h[i]=((fact(n))/(fact(n-2)*2)); } else { h[i]=0; } } for(i=0;i