#include <stdio.h> #include <string.h> int main() { int n1=17;int n2=49;int n3=50;int n4=53;int n5=54;int n6=56;int n7=57;int n8=59;int n9=60;int n10=62;int n11=63;int n12=65;int n13=67;int n14=68;int n15=69;int n16=35;int n17=39;int n18=52;int n19=73;int n20=25;int n21=70;int n22=61;int n23=30;int n24=41;int n25=55;int n26=66;int n27=29;int n28=28;int n29=64;int n30=51;int n31=58;int n32=27;int n33=36; char c1=n1+'0';char c2=n2+'0';char c3=n3+'0';char c4=n4+'0';char c5=n5+'0';char c6=n6+'0';char c7=n7+'0';char c8=n8+'0';char c9=n9+'0';char c10=n10+'0';char c11=n11+'0';char c12=n12+'0';char c13=n13+'0';char c14=n14+'0';char c15=n15+'0';char c16=n16+'0';char c17=n17+'0';char c18=n18+'0';char c19=n19+'0';char c20=n20+'0';char c21=n21+'0';char c22=n22+'0';char c23=n23+'0';char c24=n24+'0';char c25=n25+'0';char c26=n26+'0';char c27=n27+'0';char c28=n28+'0';char c29=n29+'0';char c30=n30+'0';char c31=n31+'0';char c32=n32+'0';char c33=n33+'0'; int v,w,y,z,m,n,o,p,q,r,s,t; char c[100]; char str[100]={c23,c7,c8,c7,c14,c2}; char str1[100]={c10,c7,c8,c7,c14,c2}; char str2[100]={c27,c4}; char str3[100]={c22,c4}; char str4[100]={c28,c2,c8,c13,c6,c19,c2}; char str5[100]={c9,c2,c8,c13,c6,c19,c2}; char str6[100]={c24,c11,c15}; char str7[100]={c19,c11,c15}; char str8[100]={c28,c11,c21,c4}; char str9[100]={c9,c11,c21,c4}; char str10[100]={c1,c8,c2,c10,c13,c6,c2}; char str11[100]={c2,c8,c2,c10,c13,c6,c2}; printf("%c%c%c %c%c %c%c%c %c%c%c%c%c %c%c %c%c%c %c%c%c%c %c%c%c%c%c%c%c%c%c?\n%c%c%c%c %c%c %c%c%c%c%c%c ⊙﹏⊙ ",c17,c6,c11,c18,c11,c19,c11,c15,c14,c6,c7,c10,c8,c7,c13,c14,c6,c4,c22,c11,c13,c14,c3,c4,c2,c15,c14,c7,c5,c15,c9,c33,c4,c9,c9,c22,c4,c29,c9,c4,c2,c13,c4); scanf("%s",c); v=strcmp(c,str); w=strcmp(c,str1); y=strcmp(c,str2); z=strcmp(c,str3); m=strcmp(c,str4); n=strcmp(c,str5); o=strcmp(c,str6); p=strcmp(c,str7); q=strcmp(c,str8); r=strcmp(c,str9); s=strcmp(c,str10); t=strcmp(c,str11); if(v==0||w==0||y==0||z==0) { printf("\n\n%c%c%c %c%c%c %c%c%c%c%c :)",c24,c11,c15,c2,c26,c4,c26,c7,c25,c6,c14); } else if(m==0||n==0||o==0||p==0) { printf("\n\n%c%c%c%c %c%c%c%c %c%c%c%c%c %c%c %c%c%c%c%c %c%c%c. ;)",c1,c7,c13,c2,c3,c2,c13,c13,c2,c2,c29,c8,c11,c6,c7,c9,c2,c25,c14,c2,c6,c2,c7); } else if (q==0||r==0) { printf("\n\n%c%c%c%c %c%c%c %c%c%c %c%c%c%c%c!!!!",c11,c6,c6,c6,c29,c14,c2,c14,c6,c2,c22,c15,c31,c6,c4); } else if(s==0||t==0) { printf("\n\n%c%c%c%c %c%c%c %c%c%c%c %c%c%c%c %c%c%c %c%c %c%c%c.",c32,c15,c30,c6,c3,c6,c7,c13,c11,c30,c6,c9,c4,c14,c7,c6,c2,c7,c14,c15,c3,c6,c7); } else { printf("\n\n%c%c%c, %c%c%c %c%c%c%c%c.",c23,c11,c11,c14,c26,c19,c2,c25,c2,c7,c10); } return 0; }
Write, Run & Share C Language code online using OneCompiler's C online compiler for free. It's one of the robust, feature-rich online compilers for C language, running the latest C version which is C18. Getting started with the OneCompiler's C editor is really simple and pretty fast. The editor shows sample boilerplate code when you choose language as 'C' and start coding!
OneCompiler's C online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample C program which takes name as input and print your name with hello.
#include <stdio.h>
int main()
{
char name[50];
printf("Enter name:");
scanf("%s", name);
printf("Hello %s \n" , name );
return 0;
}
C language is one of the most popular general-purpose programming language developed by Dennis Ritchie at Bell laboratories for UNIX operating system. The initial release of C Language was in the year 1972. Most of the desktop operating systems are written in C Language.
When ever you want to perform a set of operations based on a condition if-else
is used.
if(conditional-expression) {
// code
} else {
// code
}
You can also use if-else for nested Ifs and if-else-if ladder when multiple conditions are to be performed on a single variable.
Switch is an alternative to if-else-if ladder.
switch(conditional-expression) {
case value1:
// code
break; // optional
case value2:
// code
break; // optional
...
default:
// code to be executed when all the above cases are not matched;
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
// code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while(condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
Array is a collection of similar data which is stored in continuous memory addresses. Array values can be fetched using index. Index starts from 0 to size-1.
data-type array-name[size];
data-type array-name[size][size];
Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
Two types of functions are present in C
Library functions are the in-built functions which are declared in header files like printf(),scanf(),puts(),gets() etc.,
User defined functions are the ones which are written by the programmer based on the requirement.
return_type function_name(parameters);
function_name (parameters)
return_type function_name(parameters) {
//code
}