49,761 Topics

Member Avatar for
Member Avatar for browneyeguy25

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 …

Member Avatar for Reverend Jim
0
433
Member Avatar for JustinRunyon

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 …

Member Avatar for nullptr
0
243
Member Avatar for paulofficial

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.

Member Avatar for nullptr
0
150
Member Avatar for Sandy0221

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 …

Member Avatar for rproffitt
1
248
Member Avatar for peregrinepair

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! …

Member Avatar for Reverend Jim
0
350
Member Avatar for ZombieKnight93

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 …

Member Avatar for tinstaafl
0
1K
Member Avatar for Zeeshan_10
Member Avatar for elifelo

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 ?

Member Avatar for rproffitt
0
372
Member Avatar for Pujinraffh

program buys internet packages with credit (pulsa) with do while loop . Dev c++

Member Avatar for rproffitt
-2
142
Member Avatar for Addison111

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 = …

Member Avatar for tinstaafl
0
308
Member Avatar for Ati_1

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 …

Member Avatar for rproffitt
0
322
Member Avatar for fanolots

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 …

Member Avatar for tinstaafl
0
313
Member Avatar for Addison111

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 …

Member Avatar for rproffitt
0
434
Member Avatar for djbsabkcb

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?

Member Avatar for jacklin
0
2K
Member Avatar for Nancy_16

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, …

Member Avatar for jacklin
1
1K
Member Avatar for ZombieKnight93

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, …

Member Avatar for Smith5646
0
855
Member Avatar for tony_28

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 …

Member Avatar for rproffitt
0
545
Member Avatar for Cyale

//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 >> …

Member Avatar for rproffitt
0
493
Member Avatar for cambalinho

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 …

Member Avatar for Topiary
1
1K
Member Avatar for chandan_14

#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(); }

Member Avatar for Reverend Jim
0
339
Member Avatar for Hazardous_Byte

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 …

Member Avatar for rakesh_15
0
2K
Member Avatar for nitin1

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 …

Member Avatar for ddanbe
0
5K
Member Avatar for Wong_2

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...

Member Avatar for Softvelopers
0
177
Member Avatar for Omama

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 …

Member Avatar for Reverend Jim
0
792
Member Avatar for Addison111

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 …

Member Avatar for rproffitt
0
506
Member Avatar for Addison111

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 …

Member Avatar for kevenm
0
919
Member Avatar for arithehun

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 …

Member Avatar for Aaron_16
-5
15K
Member Avatar for brittany435

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] …

Member Avatar for Reverend Jim
0
3K
Member Avatar for Melika_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!

Member Avatar for rproffitt
0
144
Member Avatar for student_x

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 …

Member Avatar for G._1
0
3K

The End.