49,761 Topics
| |
I trying to write a code that reads a set of integers and then finds and prints the sum of the even and odd integers. The numbers will be read in from the user via the cin statement. You do not know how many numbers the user may enter. When … | |
Hello, have the following program code: #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main (void) { char c; while( (c = getchar()) != '\n') { putchar(c); } putchar ('\n'); return EXIT_SUCCESS; } At the moment he reads in entered characters and outputs them again. I should [write](https://prowritingservice.com/write-my-essay/) it so that … | |
write a C++ program to find the volume of a cube. The program should provide setting and gettng the values of cube( height, length and breadth). show how encapsulation and abstraction is implimented in your programme. you must use a class concept and the main function. | |
I'm having a difficulty to write this program in c++ please help me First generate 100 random numbers in the range [11, 25] and store them in a file named “random.txt”. Write just one number in each row. Then open and read data from the file “random.txt”. Calculate the average … | |
Hello, this is my first post. I need help with this assignment here, dont know where to begin! maybe I should use strstr()? The output needs to be what is shown at the bottom. I cant use the string class, only c-style functions. Any hints would be welcome thank you! … | |
So I have a poker type program where it should shuffle and deal a deck of cards using arrays of pointers. I have to write a function that uses a pointer(s) to determine if the hand contains an Ace. If I can understand this one, I'd be able to do … | |
I want to create a game that computer guesses the number that i think between 0-500 but i am a beginner and i do not know what to do could you help me please ? | |
program buys internet packages with credit (pulsa) with do while loop . Dev c++ | |
I have some problems when working with Win32 api. 1. Changing the text and background color of a button doesn't take effect. My code: case WM_CTLCOLORBTN: COLORREF colorref; colorref = RGB(0,0,255); HBRUSH hBrushBtn; hBrushBtn = CreateSolidBrush(colorref); return ((LRESULT)hBrushBtn); break; 2. How do I create selectable text. My code: text = … | |
Algorithm 1) Choose the time quantum and assign it for each process. 2) Allocate the CPU to the process according to the FCFS scheduling. 3) If (burst time of the process < time quantum).{Allocate the CPU to that process till it terminates.}Else {The process will occupy the CPU till the … | |
Hey, I don't know if this is the right place, but my issue is taking an output from a software SPI and using it in another function for temperature. The code below is marked with my issue, however it's not the full code. The full code is for a lab … | |
I'm trying to setup mongoos server in a Winndows app. The server code needs to be in an infinite loop, so does the windows main loop. I put the server code and win loop on 2 threads, the problem is, the program hangs when executed. Is there a way to … | |
Question: I have to do a program on alternating sums using vectors. I am not sure how to start this program. I thought about using an array and every even index add the value and every odd index subtract the value. Does that sound right? Any ideas? | |
I am using PySide2 for GUI. I have a "Rename Project" QAction. The function must be like this: 1. set enable to false if tab name is "*Untitled" or file is unsaved. 2. set enable to True if file is loaded. How to do this? 3. Whenever switching to tab, … | |
How can I make this to continue until the user presses N? I've tried using while(1), while( option == 'y' || option == 'Y') but it kept giving an error for that, and if/else statements but no luck. So I decided to try a do while statement and same results, … | |
Hi All, In this program I have these 2 matrices . It will compare each element in each row of matrix[4][4] to 3 . If that value <= 3 then store the characters in the first row of matrix m_c[25][32] in an 2D char array (char clusters[40][40]). For example 3 … | |
//How to change cin and cout to printf and scanf??? #include <iostream> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; do { board(); player=(player%2)?1:2; cout << "Player " << player << ", enter a number: "; cin >> … | |
how avoid memory leaks? from here: http://www.winprog.org/tutorial/bitmaps.html i learned: GetDC() - ReleaseDC() BeginPaint() - EndPaint() CreateCompatibleDC() - DeleteDC() i must get the old selected object. select it when isn't needed and then delete it. so seen these constructor and desctructor: image(const int width, const int height) { if (isimgused==true) delete … | |
#include<iostream.h> #include<conio.h> class game { int a,b,c; public: void g() { cout<<"Enter value of a<<endl; cin>>a>>b; if(a<b) { cout<<a,<<endl; c++; } } }; void main() { game g1; g1.g(); getch(); } | |
I have written a bootloader in ASM (I can post code if you like) and I plan to write a kernel in C /c++ because I don't want to have to deal with a Kernel written ENTIRELY in ASM. Is there any way (Got to keep this under or at … | |
Hi, How can I pass a c# string to C++ side of the app? Right now, I have all handling in Const char * format . When I pass c# string, c++ working fine when using Platform::String . But there is no good way of converting Platform::String to const char … | |
i'm newbie in the programming in language c++ can i know what the code of update function and delete function?I have no idea to do this 2 function someone can help me? please... | |
Hi, below is my code for binary search algorithm. My question is, what if I enter more than 1 same numbers in the array? How should i modify my code to print out all the locations where that same number is found? For example, if I entered the number 2 … | |
I have a web server app, and a client app that works like a browser. I get the desired response from the server app if I type my IP in the browser window, if I read the response to the client app I get an empty string. The client app … | |
I'm trying to build a client and a server in the same program. For example, user 1 sends a packet of data to user 2, user 2 after receiving the packet sends back a different packet to user 1. The problem is, after running the program neither user receives the … | |
This is a tutorial, not a program. [b]Step 1[/B] First, create a file for your website, and name it "admin.html". [b]Step 2[/b] Now on it, say, "You must log in to view admin, blah,blah,blah. Click here to launch our client." [b]Step 3[/b] Link "Click here" with the C++ .exe file … | |
Hello, I am working on a small program that reads ten numbers, computes their average, and finds out how many numbers are above average. This is the set up I have so far: #include <iostream> using namespace std; int main() { double myList[10]; myList[0] = 89 myList[1] = 56 myList[2] … | |
Having 2 integers, by using their decomposition we want to calculate their binary gcd algorithm Please help me to write a c++proram. Unfortunayely, due to sanctions against my country Iran I can' t pay! | |
Coin game: Alice and Bob are playing a game using a bunch of coins. The players pick several coins out of the bunch in turn. Each time a player is allowed to pick 1, 2 or 4 coins, and the player that gets the last coin is the winner. Assume … |
The End.