Anonymous
Is it a monitor from dinos age?
Dima
What the heck
Dima
jack
its turbo's screen
jack
lol
jack
its is blue from birth😂
jack
screenshot will be the same
Андрей
nice code :D
Anonymous
screenshot will be the same
We don't need neither screen pic nor screenshot
jack
ok then let me write a logic for pattern
Err0rX
ok then let me write a logic for pattern
https://www.programiz.com/c-programming/examples/pyramid-pattern
Err0rX
const size_t begin_index = 4; const size_t end_index = 7; for (size_t i = begin_index; i <= end_index; ++i) { ... }
if i want to search from right to left in an array then should i type this for (size_t i = end _index; i >= start_index; —i)
Err0rX
thanks
Anonymous
And I'm lazy to explain why, so don't ask
jack
s1[ ]="ementplace"; for(i=0;i<a;i++) { for(j=0;j<a;j++) { if(i<=a&&j==a) { printf("%c",s1[j]); } else { printf(" "); } } printf("\n"); }
Err0rX
ok trying to search it on google
Anonymous
If start_index is 0, it's better to change type from size_t to int
The reason why is that you'll get an infinite loop
Anonymous
The reason why is that you'll get an infinite loop
But I'm not in right condition to explain how it happens
Anonymous
jack
haha
jack
i have compiled it so many times without a single error
I_Interface
what is the mistake
that array declaration, my eyes...
jack
its running
jack
this just a code to print a pattern
Anonymous
its running
That means it is not either C or C++
jack
its not a whole code
Anonymous
But this chat is devoted to c and c++
jack
Anonymous
a noob can tell it is c
It cannot be compiled with c compiler, so it's not c
jack
have you seen those functions
I_Interface
It cannot be compiled with c compiler, so it's not c
Danya, let him swimming in this shit, it's his problem what he doesn't want to write a normal code
Anonymous
have you seen those functions
So what lol? You can declare a function with that name in a lot of languages
Anonymous
Pavel
Is there a way to see what types were deduced in some places where auto or decltype used? Does any online compiler have such feature I know this thing, but it fails on function declarations and on modern syntax https://cdecl.org/
Anonymous
What IDE you're using?
Pavel
QT creator and Visual Studio
Anonymous
Doesn't Visual Studio show deduced types for variables?
Pavel
not sure, you mean in debugger?
Pavel
let me check
jack
#include<conio.h> #include <stdio.h> void main() { int a,mid,length,i,j; char s[50],s1[100]; printf("enter any string...\n"); gets(s); a=strlen(s); mid=a/2; strcpy(s1,s+mid); strcat(s1,s); for(i=0;i<a;i++) { for(j=0;j<a;j++) { if(i<=a&&j==a) { printf("%c",s1[j]); } else { printf(" "); } } printf("\n"); } getch(); }
Anonymous
not sure, you mean in debugger?
I mean when you direct your mouse to variable
Anonymous
The best way to get a string with type is using Boost.TypeIndex
Anonymous
thanx
It was a joke
Anonymous
Your code is bad
jack
Your code is bad
yeah thats why i am here to know how to do it
I_Interface
yeah thats why i am here to know how to do it
why void main ? why all of u write it...
Azzam
Developers are developing things like CLion and peepz are still working on turbo C xD
jack
It is Turbo C
yes it is
I_Interface
It is Turbo C
and #include <conio.h> ...
Anonymous
The person likes to use outdated stuff
Azzam
just work on code instead of writting that much shit..
Work on your coding environment first xD
jack
i am not that experienced like you are...
jack
so i use what i know
Azzam
so i use what i know
No problem cool..
jack
No problem cool..
dont think everybody is experienced like you....
Azzam
dont think everybody is experienced like you....
S is a character and mid is an integer.... What are you trying to do babe ?
Azzam
lol use visual studio
Atleast sublime 🤣
Anonymous
i only know this...
If you stick to only what you and if you don't want to learn new stuff, you're bad programmer
I_Interface
If you stick to only what you and if you don't want to learn new stuff, you're bad programmer
i don't remember, but in C there is string.h ? not better to use it
jack
but i am
Anonymous
i don't remember, but in C there is string.h ? not better to use it
Yes, string.h contains str*() functions to manipulate c strings
I_Interface