49,761 Topics

Member Avatar for
Member Avatar for Violet_82

Hi there, I am trying to do an exercise from a C++ book. It goes: Develop a program that will move the knight around an empty chessboard. The chessboard is represented by an 8-by-8 two-dimensional array [ICODE]board[][][/ICODE]. Each of the squares is initialized to 0. We describe each of the …

Member Avatar for yaer
0
3K
Member Avatar for atler

int cols, rows; int thehead=9; for( cols = 1; cols <= thehead; cols++) { for(rows = 1; rows <= thehead; rows++) { if(((cols+rows)==5) || ((rows-cols)==5)) { cout << " "; } else { cout <<"*"; } } cout<<endl; }

0
87
Member Avatar for Tafadzwa_2

JQ is taking a car trip with his family. On the trip, he will stop for fuel, food or lodging. When stopping for gas, JQ will record the amount of fuel he is willing to pay for. When the family stops for lodging, they will also have a meal. JQ …

Member Avatar for rproffitt
0
78
Member Avatar for jozz3

I have to convert a piece of C++ code to Python. Except I can't understand what it's doing. This is the code: [CODE]#include <iostream> using namespace std; int calculate(int values[], int size) { int answer = 0; for (int 1 =0; i< size; i +=1) } answer += values[1]; } …

Member Avatar for Smartfitness33
0
8K
Member Avatar for Jericho_2

Can someone help me with this? Write a c++ program simulator that will compute for the average waiting time of each customer in a bank. Also the program will indicate the number of the teller who accommodates the customer.

Member Avatar for Dani
0
133
Member Avatar for Muhammet

This is my derivative function. This code works correctly but does not delete the constant term. It sets directly to 0 and writes to the result. how can i fix this? Thank you.. EX: Input: "-x^3-6x^2+ 4x+22" Output: “-3.0x^2 -12x +4.0 + 0.0” How can i delete this 0.0? struct …

Member Avatar for rproffitt
0
568
Member Avatar for nfia

Can someone help solve this as C++ program for me? Write a program to process weekly employee time cards for all employees of an organization. Each employee will have three data items: an identification number, the hourly wage rate, and the number of hours worked during a given week. Each …

Member Avatar for Dani
0
47
Member Avatar for Abdul_68

how to Delete the whole list using myList.deleteAll( ) and Implement Linked Stack for Character data type to show name in reverse In the following code?

Member Avatar for rproffitt
0
41
Member Avatar for ASD_3

Would anyone be able to help me, I am trying to make a C++ program which reads values from csv file and prints them(there are going to be three 4 rows, 3 columns). I want to know how can I add the rows (like the sum of the first row …

Member Avatar for Amber_12
0
276
Member Avatar for Abdul_68

Q1. Given the partial implemenatation of Linked List, you are required to add the following functionality in the code Delete the whole list e.g. myList.deleteAll( ); Implement Linked Stack for Character data type and show how it reverses your Name. Q2. Show in diagramatic representation (draw by hand, take picture …

Member Avatar for rproffitt
-1
245
Member Avatar for LocalHero

Hello, I'm new to C++. How do I find the sum of integers from a through b, no input from user needed, and only using while loop statement. The results from my question on the internet gave me only the solution using for loop statement. Can anyone show me how …

Member Avatar for rproffitt
0
22
Member Avatar for Giyu

Anyone can help me on my GUI. I'm making a BMI calcu GUI. But I don't know hot to input to my check bmi button. Im a total beginner btw. What code I need to add in a button to perform bmi calculation?

Member Avatar for rproffitt
0
55
Member Avatar for marsh_mallows11

Create a program that would convert a decimal number to either binary, octal or hexadecimal counterpart. Your program should ask the user for decimal with a data type of a long integer (4 bytes or 32bits in length or having a range of +2147483647 to -2147483648, or 4294967296 if unsigned). …

Member Avatar for Lesther_1
0
10K
Member Avatar for computer engW

Hi everyone, Today i have a question about how can i write one code for all shapes like, ****** ***** **** *** ** * or other shapes like square or tringle. I want to know the difference in every code. Thanks alot.

Member Avatar for movies8time8
0
8K
Member Avatar for Faris._.Hussain
Member Avatar for Dani
0
23
Member Avatar for MNSRAO

Hi i am computer science students. I always confused to about php base websites or another website. Yesterday my teacher gave me assingement to check website either it is php base or other platform. But i haven't decided to give answer. I am week student in class. please help me …

Member Avatar for rproffitt
-1
45
Member Avatar for Seema_7

What are the top learning management systems for corporations? And how it helps for employee training?

Member Avatar for rproffitt
0
35
Member Avatar for Yash_17
Member Avatar for Sarmad_2

write down a program which generates numbers from 1 to 10 but in following format in C++ 1 2 3 4 5 6 7 8 9 10

Member Avatar for rproffitt
0
60
Member Avatar for lightnin6776

This is what I have so far the teacher wants us to request the file name and I have no clue where to even start. Thank you for the help! #include <iostream> #include <string> #include <fstream> #include <cmath> #include <iomanip> using namespace std; int main() ifstream inFile; ofstream outFile; string …

0
34
Member Avatar for phuocle94

This is my Code C++ for my assignment. Please help me to convert it to C code. Thank you! #include<iostream> using namespace std; #define N 10 int main() { int array[N],p,q; for(int i=0;i<N;i++) array[i]=i; cout<<"For instance, given elements are "; for(int i=0;i<N;i++) cout<<array[i]; cout<<endl; int r=0; while(cin>>p) { cin>>q; if(p>=0 …

Member Avatar for rproffitt
0
110
Member Avatar for juniorm_28

Hello everyone! I'm working on this C++ program but im kind of lost. I'm using calling fuctions with void and parameters to create this program that is supposed to average a set of 5 scores and dropped the lowest one. It should calculate and display the average of the four …

Member Avatar for tinstaafl
0
172
Member Avatar for Jack_67

I try to modified this Pac-Man Coding to spawn one more enemy which is the 'E' when the timer below 10sec but i failed to do it.Can you guys help me? I attached the coding in link below. https://drive.google.com/file/d/1f36X9s9RXL35VfNVJnx8mvWvEgcdKy3o/view?usp=sharing

0
41
Member Avatar for kevlincred

Hi All, I would personally looking for someone from the US for a partnership. This will be something like a part-time job that needs 5 hrs per week. Requirements: US citizenship for legal issues. Basic understanding of technical - Junior Full-stack (web and mobile development) Experience working remotely. Open-minded and …

Member Avatar for rproffitt
0
72
Member Avatar for Vajclav

can someone help me write this short programme I am newby... Create a class Student that will have private attributes string name, string last name, string date_birth, double average_ grade. This class must have a constructor without parameters (in which all string attributes are set to an empty string, and …

Member Avatar for topikkus
0
126
Member Avatar for juniorm_28

// This program will calculate the highest and the lowest, // variable out of a set of numbers. Also, it is going to give // the sum and the average out of this set. #include <iostream> #include <cmath> using namespace std; int main() { int number, average, amount, sum; int …

Member Avatar for Dani
0
337
Member Avatar for iRoddu

Hi dear forum members, I am brand new in C programming and have to program an "X" as homework (see attached picture). The edge length of the "X's" should be entered by the user, ie the "X" should be arbitrarily large or small. Can someone help me with the task? …

Member Avatar for Reverend Jim
0
154
Member Avatar for jkoski1996

I'm trying to make a script that helps verify a persons age on whether or not someone can go into a bar, then if they can order or not but seem to be having an issue with a "expected primary-expression before '{' token" on line 23. Here is my code: …

Member Avatar for Reverend Jim
0
44
Member Avatar for sky_xxxx4_

I have to make my sample run look like this . I cannot seem to get it right. Sample run Welcome to Vending Machine capable of deep frying twinkies Please insert coin: Enter D or d for Dollar Enter Q or q for Quarer Enter M or m for Dime …

Member Avatar for rproffitt
0
172
Member Avatar for higginset

Write an application that prompts the user for a checking account balance and a savings account balance. Display the message “Checking account balance is low” if the checking account balance is less than $10. Display the message “Savings account balance is low” if the savings account balance is less than …

Member Avatar for rproffitt
0
38

The End.