49,761 Topics

Member Avatar for
Member Avatar for Gtr_1

1. Write a program with one user-defined function to convert weight from pound to kg. 2. By using three user-defined functions, you are asked to write a program to calculate the area of a circle. Function input – ask user to input the radius Function calculate_area – calculate the area …

Member Avatar for DGPickett
0
189
Member Avatar for Xozz

I'm busy writing Yahtzee. Now, I want to fill a const char[] with the field names: 1's, 2's, 3's, ..., "Full House" "Small Straight" etc. But I get this errors #include <iostream> #include <stdlib.h> using namespace std; /* 1 2 3 4 5 6 3 of a kind carre full …

Member Avatar for DGPickett
0
265
Member Avatar for msaadmakhdoom

Operator Overloading for Polynomial Class - Your goal is to overload the operators for a generic Polynomial class. A polynomial will be represented via its coefficients. Here is a degree of third degree polynomial 4x3+ 3x + 2; here will be four coefficients and the coefficient corresponding to 2nd power …

Member Avatar for Reverend Jim
0
110
Member Avatar for Xozz

Hello. I'm stuck with my Yahtzee project. The first five lines are filled with a brief explanation of the case. Please read them /* I'm writing Yahtzee in C++. So far so good, but I'm stuck now on the recognition of staights and full houses. It's about the lines 131 …

Member Avatar for Reverend Jim
0
279
Member Avatar for Xozz

I just wrote a simple C++ program. But now I want to share it with a friend and GMail doesn't allow me to use it and putting it on a web domain doens't work either. How do you share a simple program (compiled)?

Member Avatar for Yrth
0
312
Member Avatar for Dilshan_2

#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { srand(time(NULL)); int tries = 0; int iNum; int UpperLim = 100; int LowerLim = 10; int iCompNum; cout << "Enter a number: "; cin >> iNum; do { iCompNum = rand() % (UpperLim - LowerLim) + LowerLim; cout …

Member Avatar for Reverend Jim
0
165
Member Avatar for Xozz

While compiling my Yahtzee project I get these errors: ||=== Build: Debug in Yahtzee (compiler: GNU GCC Compiler) ===| ld.exe||cannot open output file bin\Debug\Yahtzee.exe Permission denied| ||error: ld returned 1 exit status| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| I use CodeBlocks. It's not nice …

Member Avatar for Reverend Jim
0
116
Member Avatar for Youtube_1

A school wants to be able to check how students have performed in any course. To do this they will use sampling. They will pick the marks of any 5 students and then get the average grade. Each course must have a mid-semester exam mark, a final exam mark, and …

Member Avatar for Reverend Jim
0
140
Member Avatar for user287961

Hi,i have this code that i need to turn in for my homework. I based it off some things i saw on the internet. The point of the homework is that i need to have 2 or more structures and use some functions. It would mean a lot if someone …

Member Avatar for nullptr
0
455
Member Avatar for GrimDemeanor

these are the goals of the assignment i am trying to complete, i am running into a problem where i need to create a function get the product the customer selected and reutrn that information in a cout that also inculdes information from another function, i got the first part …

Member Avatar for tinstaafl
0
219
Member Avatar for GrimDemeanor

I am new to C++ as i have just started programming classes, my background is in networking and hardware, so this is a completely new topic for me. I am having trouble with the creative side of writing code, as i understand the concepts and information just fine. this fourm …

Member Avatar for Dani
2
486
Member Avatar for shem j

**Any help appreciated** The school wants to be able to check how students have performed in any course. To do this they will use sampling. They will pick the marks of any 5 students and then get the average grade. Each course must have a mid-semester exam mark, a final …

Member Avatar for Reverend Jim
0
133
Member Avatar for Tajrin
Member Avatar for Ilda_1

Hello! Can someone help me with coding in R ? I am new to R and I need to solve this project. It has been so many days I dont find a solution. This is the problem : You are an online movie and concert ticket service. Visitors go to …

Member Avatar for rproffitt
0
279
Member Avatar for mahmoud adel

#include<iostream> using namespace std; int main() int number; int counter=1; int fact=1; cout<<"enter number \n"; cin>>number; while(counter<=number) fact*=counter; counter++; cout<<fact<<endl; how to ask user to repeat

Member Avatar for Reverend Jim
0
144
Member Avatar for Xozz

Hello, While trying to get back into programming, I come across problems. The first one is: Why can't I work with global variables? Is there a new way of doing the same thing? Thanks

Member Avatar for Reverend Jim
0
245
Member Avatar for dlyrikal

so im trying to use the getline function on c++ withe codeblocks app but anytime i use the function which has the format *getline(iostream,variable);* it keeps ignoring the first letter or word before the space for eg in this sample cout<< "enter your full name"<<endl; //user : samuel forson cin>> …

Member Avatar for anand9796
0
135
Member Avatar for Nobu_1

Hello,i learned how to used the C++ but i have problems to analysis the problem in my project. Write a program to process monthly paycheck for all contract workers of an organization. Each worker will have the following information: Identification number (at-digit integer), the worker's name, hourly pay rate, and …

0
134
Member Avatar for Sappie

Hi, I want to sort an array of struct 'Workshops' in accordance with its member variable 'start_time'. I thought of using std::sort for the array and supplying 'CompareWorkshops' function as the third parameter- bool CompareWorkshops(Workshops W1, Workshops W2) { return (W1.start_time <= W2.start_time); } //calculate max no. of non-overlapping workshopes …

Member Avatar for tinstaafl
0
322
Member Avatar for Cannot19

1. The Broken Arrow cellular company has hired you to write a billing program for data usage on their new 4-tier 5G network. The rate schedule, including discounts for certain customers, is below. Base rate is $12.00 and includes up to 1 gigabyte of data. Anything over 1 gigabyte is …

Member Avatar for rproffitt
0
191
Member Avatar for Gabriela_2

hello everyone, I would like to ask for some help with my assignement. My task is to make a program which is converting arabic numbers to roman numerals, but I can't use loops.

Member Avatar for Ju57man
0
2K
Member Avatar for Vange

Hey? Can someone help me to this program? I need to Search an specific information of a student. #include<iostream> #include<fstream> #include<istream> #include<stdlib.h> #include<string> using namespace std; void login(),registr(),form(),Add(),ShowList(),Search(),Update(); struct Student { int id; char name[25]; char name1[25]; char address[25]; char city[25]; int age; char gender[5]; string email; string contact; char …

Member Avatar for tinstaafl
0
1K
Member Avatar for Vange

Hello, Can someone help me for my program? I need to search a specific data of the student.

0
125
Member Avatar for AbdullAh_39

alright so i have got a c++ code(AIRLINE RESERVATION SYSTEM) which i can run as console application, but i want to convert it into GUI, and i dont know anything about GUI, where and how should i begin, i have 1 and half month to present it.

Member Avatar for tinstaafl
0
296
Member Avatar for xxunknown321

I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of …

Member Avatar for jimmichaels29
0
1K
Member Avatar for ali john naqvi

How should i give space between my output numbers while i am storing them in an array ?Like if i ask user to enter numbers and one entered 12345 ,i want to display them as 1 2 3 4 5

Member Avatar for anand9796
0
523
Member Avatar for Nick_31

Okay I was trying to get my Dynamic Array to resize when I append but it just seems to break and never increase the capacity that it can store. Anyone able to figure out where my problem is? #include "DynamicArray.h" #include <cstring> #include <iostream> DynamicArray::DynamicArray() : m_length(0), m_capacity(0), m_scaling_factor(2.0), m_data(nullptr) …

Member Avatar for tinstaafl
0
201
Member Avatar for Yusuf_13

> "(https://answers.microsoft.com/en-us/windows/forum/windows_10-files/what-is-the-correctrequired-headers-to-have-for-c/3ba26bbd-5401-4a80-b3e4-0426512c2730?messageId=504b2171-4fe4-4203-aba3-fb84f607d805")

Member Avatar for rproffitt
0
224
Member Avatar for Sappie

As I'm getting to know about inheritance in C++, one thing that has stuck in my mind is using **public** keyword before **class_name** as in- class Derived: public Base {} What I wonder is that why do we need to make a class **public** that's already outside the *main* function? …

Member Avatar for anand9796
0
192
Member Avatar for smgctn

I have a fully functional code that uses the random number generator to generate a set of random numbers. I'm trying to display "e" next to all the even numbers in the set, and then have a cout statement that tells the user how many even numbers there are in …

Member Avatar for tinstaafl
0
213

The End.