Relative Content

Tag Archive for c#function

Trying to write a code in C for a kaprekar routine. How can I fix the code to get a correct output for 85555?

I am trying to build a code in C that will go over the specified 4 numbers and will give an output based on their kaprekar process. If the number converges it should return the number it converges to, if it doesn’t it should return -1. I am getting the correct result for all numbers but 85555, can someone help me identify the issue? I’ve tried to fix it but can’t find what’s wrong.

Trying to write a code in C for a kaprekar routine. How can I fix the code to get a correct output for 85555?

I am trying to build a code in C that will go over the specified 4 numbers and will give an output based on their kaprekar process. If the number converges it should return the number it converges to, if it doesn’t it should return -1. I am getting the correct result for all numbers but 85555, can someone help me identify the issue? I’ve tried to fix it but can’t find what’s wrong.

Trying to write a code in C for a kaprekar routine. How can I fix the code to get a correct output for 85555?

I am trying to build a code in C that will go over the specified 4 numbers and will give an output based on their kaprekar process. If the number converges it should return the number it converges to, if it doesn’t it should return -1. I am getting the correct result for all numbers but 85555, can someone help me identify the issue? I’ve tried to fix it but can’t find what’s wrong.

Arguments inside a C function

I am recently studying functions in C and I often notice (from online examples) that function in the main.c contains arguments with a different name than what they are called in the file in which it is declared.

Executing database query if button “Cancel” is pressed (C++)

SockectComm.cpp int retries = 6; while (retries > 0) { // Connect to server if (connect(sockfd, reinterpret_cast<sockaddr *>(&serv_addr), sizeof(serv_addr)) == SOCKET_ERROR) { std::cerr << “Unable to connect to server: ” << WSAGetLastError() << std::endl; if (retries > 1) { int result = MessageBox(NULL, “Няма връзка със сървъра, n Следващ опит след 10 секунди”, “Error”, MB_RETRYCANCEL […]

(Cs)What value do I have to give args in this function?

So some friends and me are programming a consolegame in Cs and I want to do a function (progressClick) which requires a int (in this case a coordinate for a rectangle) But it says that I dont have a correct value for the int even tho i gave them one (100).