Ilya
Move open curl brace
izzaaa
thanksss
Ilya
second part with else seems to be wrong too
izzaaa
it is wrong
Ilya
else if (status=='P') { printf("Part-Time\n"); if (Year_serviced < 5) { new_salary= (0.025*salary) + salary; printf("your new salary is %.2f\n", new_salary); } if(Year_serviced >= 5) { new_salary= (0.03*salary) + salary; printf("your new salary is %.2f\n", new_salary); } }
Keshav
Can I ask a programming question here?
Danya🔥
it is wrong
https://t.me/programminginc/507141
Keshav
Anyboy?
Send the actual question
Teena
/start@MissRose_bot
i,j,k,x,y,o,N; main(){float z[1760],a #define R(t,x,y) f=x;x-=t*y\ ;y+=t*f;f=(3-x*x-y*y)/2;x*=f;y*=f; =0,e=1,c=1,d=0,f,g,h,G,H,A,t,D;char b[1760];for(;;){memset(b,32,1760);g=0, h=1;memset(z,0,7040);for(j=0;j<90;j++){ G=0,H=1;for(i=0;i<314;i++){A=h+2,D=1/(G* A*a+g*e+5);t=G*A *e-g*a;x=40+30*D *(H*A*d-t*c);y= 12+15*D*(H*A*c+ t*d);o=x+80*y;N =8*((g*a-G*h*e) *d-G*h*a-g*e-H*h *c);if(22>y&&y> 0&&x>0&&80>x&&D>z[o]){z[o]=D;b[o]=(N>0 ?N:0)[".,-~:;=!*#$@"];}R(.02,H,G);}R( .07,h,g);}for(k=0;1761>k;k++)putchar (k%80?b[k]:10);R(.04,e,a);R(.02,d, c);usleep(15000);printf('\n'+( " donut.c! \x1b[23A"));}} /*no math lib needed .@a1k0n 2021.*/
Anonymous
Send the actual question
Hello, how do I print coordinates (x,y) in the cartesian plane in the console?  I have an exercise that asks to print the coordinates on the plane.
I_Guess_You_Are_
I_Guess_You_Are_
I_Guess_You_Are_
Can you share the entite code?
Ok. The question was. * Write a C Programming to Show your Matriculation Number. * Write a C Programming to Show Your Level. Matric Number is 2022029490 100L
Murtaza
How we can write the code of this output 1 2 3 4 5 6 . . . . . 30 31 32 33 34 35 36
Manav
How we can write the code of this output 1 2 3 4 5 6 . . . . . 30 31 32 33 34 35 36
1. Figure out the logic of the problem, i am quite sure you can see how numbers go bigger. 2. Drill down the process of generating this sequence in a series of steps. 3. Use your fingers to type.
Manav
nested loop for sure
It's offtopic, but you don't need a nested loop. The nth term can be easily calculated as it's quite a simple series 1 (+2)-> 3 (+3)-> 6 (+4)-> 10 (+5)-> 15 (+6)-> 21 ...
Anonymous
Hi, I would like to speak to an administrator to show you two pages for the "Resources" section
Ruslan
sure, pm me
I see your and Ludovic' avatars, they related to anime and I remember a joke (an IRC times):
Ruslan
-- Hello, is this an anime channel? -- Yes. -- How do I patch KDE2 under FreeBSD?
Danya🔥
-- Hello, is this an anime channel? -- Yes. -- How do I patch KDE2 under FreeBSD?
Please refer to the offtopic group for such discussions
has anyone read C Notes for Professionals book ?
Screwedmind
what is the roadmap to learn c quickly
Lodovico
WinHttpWriteData take too much to post 1 mb data Please help me
Yves Coco
Yves Coco
please some can help me to write a program on triangles of stars
Tommaso
Hi all, I have a problem with accessing a semaphore: if I use sem_timedwait it always times out, even if the semaphore is free, instead if I use sem_wait it accesses. I emphasize that it is the same semaphore.
Ziky
Hi all, I have a problem with accessing a semaphore: if I use sem_timedwait it always times out, even if the semaphore is free, instead if I use sem_wait it accesses. I emphasize that it is the same semaphore.
Ae you aware of this? The abs_timeout argument points to a structure that specifies an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Ziky
But it shouldn't be a problem if samaphore can be decremented
Tommaso
In this case it doesn't work, even if it's the same semaphore, waiting for the seconds set in ts. : clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec+=TEMPO; if(sem_timedwait(&bacchette[destra], &ts)==-1){
Tommaso
Probably stupid questions bus is the errno ETIMEDOUT and aren't you calling sem_wait before timedwait ?
I have a flag that decides whether to detect starvation or not, so if the flag==true I use timedwait, otherwise sem_wait, I used an errno to understand something but I don't go into the errno, but it exceeds the 8 seconds of the TEMPO variable
Murtaza
Hi dears how a array element deleted
labyrinth
Any recommended repo of implementing open addressing with linear probing hash table? Would love to see a complete implementation instead of a tutorial
Anonymous
I have a flag that decides whether to detect starvation or not, so if the flag==true I use timedwait, otherwise sem_wait, I used an errno to understand something but I don't go into the errno, but it exceeds the 8 seconds of the TEMPO variable
There has to be some other problem. It cant be the case that sem_tmedwait fails (unless it has been interrupted by a signal) when sem_wait succeeds. If that were the case, then it is a bug in the system call implementation. So there must be something wrong with what you are doing and we dont have the full picture.
Anonymous
Any recommended repo of implementing open addressing with linear probing hash table? Would love to see a complete implementation instead of a tutorial
I doubt you would find many outside of student repositories because linear probing has problems with clustering and stuff and no one uses a hashmap that does linear probing. You can try searching for it on Google
Anonymous
Hi dears how a array element deleted
By moving all elements past the element to be deleted, to the previous element's position
Ludovic 'Archivist'
I see your and Ludovic' avatars, they related to anime and I remember a joke (an IRC times):
Yeah, well, my former avatar was from a manga that loved to stab at Microsoft every now and then
Danya🔥
Any recommended repo of implementing open addressing with linear probing hash table? Would love to see a complete implementation instead of a tutorial
I'm not sure about the actual implementation but you can look up Abseil flat containers and maybe there are some in Folly too
Anonymous
Well a lot of companies use open addressing hashtables because they are more cache efficient
With quadratic probing or even better probing techniques. Not linear probing
XyzMoney
Hi guys just joined the channels
XyzMoney
any advise on how to be successful in C++ ?
Pavel
any advise on how to be successful in C++ ?
Do hobby projects, don't stop learning (even if you feel you know everything, it's a trap), don't reject other concepts or languages just because they feel alien to you
Ludovic 'Archivist'
Well a lot of companies use open addressing hashtables because they are more cache efficient
Hybrid tables are popular too, storing only the hash and a pointer in the table
Ludovic 'Archivist'
any advise on how to be successful in C++ ?
Practice, follow conferences, try things, and just work in any industry I would also recommend you learn other languages and see how what you learn there applies to C++
Md. Tanzim
I can't understand operator overloading
Md. Tanzim
How can I implemented my C++ knowledge. i wanna do some Real world project so that I can extend my Confidence... can anyone helps me for guidance
Manav
I can't understand operator overloading
Think of operators as they're functions then you can overload them just like how you do with functions add(int a, int b); add(T a, int b); // T is some custom class you defined. The same you do with operators operator+(int a, int b); operator+(T a, int b); 👆non members functions Here like add is the function name, operator+ is the function name So for T a; These are all valid expressions add(a, 1); // call add(T, int) a + 1; // call operator+(T, int) operator+(a, 1);
Manav
How can I implemented my C++ knowledge. i wanna do some Real world project so that I can extend my Confidence... can anyone helps me for guidance
Start small, the problem with beginners is that they have unrealistic expectations and take on unnecessarily large projects with no idea how to complete it.
itsmanjeet
Do anyone using LLVM on windows, I am writing LLVM backend for my language srclang. I installed llvm package via winget install LLVM.LLVM but the required cmake configuration file llvmConfig.cmake is missing on C:/Program Files/LLVM/lib/cmake on llvmConfigExtensions.cmake, I tried googling the issue but they ask to compile llvm from source code, uhh, LLVM toolchain is a Big project take a lot of time to compilation and space.
Danya🔥
Do anyone using LLVM on windows, I am writing LLVM backend for my language srclang. I installed llvm package via winget install LLVM.LLVM but the required cmake configuration file llvmConfig.cmake is missing on C:/Program Files/LLVM/lib/cmake on llvmConfigExtensions.cmake, I tried googling the issue but they ask to compile llvm from source code, uhh, LLVM toolchain is a Big project take a lot of time to compilation and space.
I contribute to the "llvm-project" a bit but I'd not even dare to use it on Windows, I think it is too hard, but maybe I'm overreacting I use WSL to edit the source code and build it and I'd suggest you to do so Yet, the right place to ask would be https://discourse.llvm.org Also, you may want to try installing LLVM from the official release in Github using GUI installer, maybe the problem is the winget package itself
itsmanjeet
WSL is linux itself, so it will not help in my case
Danya🔥
Also the other solution would be to find projects on Github that use LLVM as library on Windows and look up their CI scripts but I'm not quite aware of such projects.
Danya🔥
How resource constraint are you? I mean CPU, Memory, Storage
Danya🔥
The same thing is already asked on the forum, and solution is to use snapshots, that are outdated, and on the github issues, issue is already reported with log from 2022 to may 2023, and no reply from dev
if your goal is just to cross-compile and then share binaries, you may want to write a powershell script once that is gonna build the project with LLVM itself and then just run in in the Github CI In the project below there are some jobs that build LLVM from scratch in Ubuntu and they take usually 100 minutes https://github.com/banach-space/llvm-tutor/ I think it is ok to wait an hour and a half for the binary of the platform you don't quite care about
itsmanjeet
Danya🔥
Ye, https://github.com/c3lang/c3c/blob/master/CMakeLists.txt#L88 they are doing something similar, trying that
Cool I'd still share your problem with other folks on forum and the actual solution to it if you find one It'd useful for others
itsmanjeet
How resource constraint are you? I mean CPU, Memory, Storage
16Gig Memory, i7 CPU, Tried llvm build from source on linux, it takes nearly 2 hrs for complete build, on windows it will definitely take more
Danya🔥
16Gig Memory, i7 CPU, Tried llvm build from source on linux, it takes nearly 2 hrs for complete build, on windows it will definitely take more
What storage do you have? It is very essential What is the generation of the CPU? On my i7-12700, 64 GB, Samsung 970 Evo Plus SSD it takes like 20-30 minutes at worse — LLVM + MLIR
Danya🔥
thanks buddy, also please share the forum post url.
> also please share the forum post url. What do you mean?
Danya🔥
16Gig Memory, i7 CPU, Tried llvm build from source on linux, it takes nearly 2 hrs for complete build, on windows it will definitely take more
There are some tricks to reduce build time 1. Use ninja build system 2. Use lld or mold linkers instead of the standard ld