This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p:madam | |
| o/p:Palindrome | |
| sample i/p:abcd | |
| o/p:Not a Palindrome | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main() { | |
| int i,j,l,flag=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: | |
| 4 | |
| 1 2 3 4 | |
| 5 6 7 8 | |
| 9 10 11 12 | |
| 13 14 15 16 | |
| o/p:68 | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| //series 1 2 3 5 8 13 21 34 55 89... | |
| int main() { | |
| int n,i,nx,t1=1,t2=2; | |
| scanf("%d", &n); | |
| if(n==1){ | |
| printf("1"); | |
| }else if(n==2){ | |
| printf("2"); | |
| }else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: aaabbEEcc | |
| o/p: cEba | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main() { | |
| int f=0,s=0,l,i,co=0; | |
| char str[1002],ans[1002]; | |
| scanf("%s", str); | |
| l=strlen(str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p:5 | |
| 1 2 3 4 5 | |
| o/p:3 | |
| sample i/p:6 | |
| 22 25 43 12 10 11 -->convert ascending order then...find meidan | |
| o/p:17 | |
| #include <stdio.h> | |
| int main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: 5 | |
| o/p: * | |
| * * * | |
| * * * * * | |
| * * * * * * * | |
| * * * * * * * * * | |
| #include <stdio.h> | |
| int main() { | |
| int n,i,sp,k; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: 4 | |
| o/p: 1 | |
| 2*2 | |
| 3*3*3 | |
| 4*4*4*4 | |
| 4*4*4*4 | |
| 3*3*3 | |
| 2*2 | |
| 1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: 5 | |
| o/p: 1 | |
| 22 | |
| 333 | |
| 4444 | |
| 55555 | |
| #include <stdio.h> | |
| void printans(int n1){ | |
| int j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: 3 3 | |
| 1 2 3 | |
| 4 5 6 | |
| 7 8 9 | |
| o/p: 1 4 7 | |
| 2 5 8 | |
| 3 6 9 | |
| #include <stdio.h> | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sample i/p: 5 | |
| o/p: | |
| * * | |
| ** ** | |
| *** *** | |
| **** **** | |
| ********** | |
| ********** | |
| **** **** |