49,761 Topics

Member Avatar for
Member Avatar for hadisur_rahman

# we get month for (month=days/30;) years for ( years=month/12;) but we also get days for(( days=days%30, why it happend explain ??)) #

Member Avatar for rubberman
-1
211
Member Avatar for basitji

hi all friends plz help me. i have an assingment giving by sir. write a program that accepts three values from user and print the highest value from them? remember: The program should be for turbo c.

Member Avatar for rubberman
0
97
Member Avatar for Petcheco

Hello, guys. Here's the challenge: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? I wrote my code: #include …

Member Avatar for Petcheco
0
319
Member Avatar for CodeWarrior14

Hello, A simple program I am writing uses a struct to store a key and key size variable. However I get an error that states that my struct variable is being used without being initialized... I dont really know why it is telling me that. Code: `keygen.hpp` #include <ctime> #include …

Member Avatar for jencas
0
174
Member Avatar for 04279169

04279169@uofn.edu.om Do Muluplication in this program ? #include<iostream> using namespace std; class Node { private: int row;// different data type for other apps int column; int value; Node *next; // the link pointer to next item public: Node(int x=0,int y=0,int z=0,Node * ptr=NULL); // constructor int getRow(); int getColumn(); int …

Member Avatar for startomana
0
208
Member Avatar for Andrey_4

Authors of PVS-Studio static code analyzers offer programmers to test their sight and to try finding errors in C/C++ code fragments: https://software.intel.com/en-us/blogs/2015/04/24/lets-play-a-game-find-bugs-in-popular-open-source-projects

Member Avatar for Suzie999
0
198
Member Avatar for Kenneth_3

I am trying to compile the following code and I keep getting a reference error for my output file through a function. The purpose of the program is to read a file, sort through arrays, and output into a certain form. I am sure it is something small, but I …

Member Avatar for Kenneth_3
0
164
Member Avatar for Amoula_1

Hi I need a program that open a file.txt and read the content .. please help, i think the function is FileRead but i don't know how to uses it , please THank you

Member Avatar for Moschops
0
59
Member Avatar for CSprogA

basicly my project is making a shopping list which allow the user to: - type 1 to add a new shopping list - type 2 to add an item on existing shopping list - type 3 to check certain items in a certain list as bought - type 4 to …

Member Avatar for Schol-R-LEA
0
9K
Member Avatar for markdean1989

Hi, my question is very simple. Like the title says; How to declare an object? I have this declaration in my program; Class_name Object_name; and it is giving me an error, saying "Expected a ';' before "Object_name" And this is driving me nuts because putting a ';' before the object …

Member Avatar for deceptikon
0
375
Member Avatar for Erica_2

So i am back again, working with arrays this time. I can get it to run in the main but i am not sure how to make this code into a void function . #include <iostream> #include <iomanip> #include <string> using namespace std; int main () { // Declare variables …

Member Avatar for Erica_2
0
586
Member Avatar for complete

I have a silverlight app that uses TextBox XAML controls. In the c++ code-behind, IXRTextBoxPtr types are associated with these textboxes using "FindName" like this: FindName(L"ColNum3", &m_pColNum3); (where ColNum3 corresponds with the XAML CODE like this: ) Then, the code assigns the pointer like this: std::wstring wsTransfer; // gets the …

Member Avatar for complete
0
866
Member Avatar for markdean1989

I have an issue with the random generator. I use the code; myNumber = rand() % 100; //for numbers 1 - 100; My problem is, the numbers getting generated have a pattern. Such that the first output is 33, 43, 62, 29, 0, 8 ... Why is this so? I …

Member Avatar for rubberman
0
633
Member Avatar for eng.basil

write aprogram in c++ using for loop to calculate the max number and min number and make the avg >>in output screen?

Member Avatar for ddanbe
-1
80
Member Avatar for Abdul_32

i have this two dimensional array float grades size [30] [10]; my question is how to address a number for example 2 in the first row first column?

Member Avatar for ddanbe
0
64
Member Avatar for Fernando_7

Hey guys I need a push in the right direction im confused on how to iterate through this string "feeenhpoorilumayngtumseatsdmepotositnsfrlerruepsrennurdaorantiedbeunrtioradarahe" frontwords and backwards a push in the right would be pleasent if anyone can help

Member Avatar for Petcheco
0
105
Member Avatar for cypherscouter13

I have the following code int main() { compute(); return 0; } void compute() { double Ptr; vector <double> Vector; for (int u=0; u<N; u++) { computeFor(u, Vector, Ptr); Vector.push_back(EnergyPtr); } } void computeFor(int i, vector<double> &List, int u, vector<double> &Vector, double &Ptr) { int Num = List.size(); int pos[2][Num]; …

Member Avatar for rubberman
0
320
Member Avatar for hadisur_rahman

*****Describe the output in step by step with details>>>> #include<iostream> using namespace std; class A { int x,y; public: A(){x=10;y=10;} A(int a,int b){x=b;y=a;} ~A() {cout<<"X="<<x<<","; cout<<"Y="<<y<<endl; } }; int main() { cout<<"Start main\n"; A point1(50,20); A point2; A point3(40,30); cout<<"End Main\n"; return 0; }

Member Avatar for rubberman
0
159
Member Avatar for Ana_4

Create a program that calculates and displays the average price stored in the file. Display the average with a dollar sign and two decimal places.

Member Avatar for rubberman
-3
68
Member Avatar for Asira18

Hi guys am writing a program for a restuarnt and its about their menu. am in need of corrections,ideas and anything that will make the program excellent thanks..below is the code. #include <cstdlib> #include <iostream> #include <cstring> using namespace std; int main(int argc, char *argv[]) { int num1,num2,num3,num4,num5,num6; cout<< "WELCOME …

Member Avatar for Asira18
0
226
Member Avatar for tgreiner

I am reading a data set where each data line contains a value that I want to read over and then ignore. So, I create three variables as: int number1, number3; float number2; and read them in. I use the data in number1 and number3, but never use number2 (other …

Member Avatar for rubberman
0
4K
Member Avatar for My_1

I know the following sound a homework problem but it not it a study guild I to study but i am stuck. I really need help. I dont want to fail the test tomorrow The following C code defines Fibonacci function int fib (int n) { if (n == 0) …

Member Avatar for My_1
0
337
Member Avatar for ramonlarodo

What I am trying to do is each thread gets to print out its 5 characters before potentially yielding to another thread. It works but it does not do what I want. THanks for help. for (unsigned i = 0; i < _repCount; ++i) { unique_lock<mutex> lck(mtx); cv.wait(lck, []{return !inUse; …

Member Avatar for Moschops
0
118
Member Avatar for James_44

I can't figure out how to get my functions to work. I have to use void functions but I'm lost. I have to bring data in. An array of numbers. 8 27 33 14 81 146 305 249 412 71 226 4 144 55 97 493 133 265 788 240 …

Member Avatar for tinstaafl
0
205
Member Avatar for hadisur_rahman

#include<iostream> using namespace std; class B { int a; public: int b; void get_ab(); int get_a(); void show_a(); }; class D :public B { int c; public: void mul(); void display(); }; void B::get_ab() { a=5;b=10; } int B::get_a() { return a; } void B::show_a() { cout<<"a="<<a<<"\n"; } void D::mul() …

Member Avatar for Hassan_12
0
251
Member Avatar for m andrew
Member Avatar for Hassan_12
0
247
Member Avatar for Petcheco

Hello, guys. I've wrote the following code #include <iostream> #include <string.h> #include <string> #include <locale> #include <stdio.h> #include <stdlib.h> #include <limits> #include <vector> #include <windows.h> using namespace std; string Numero_de_Matricula = ""; string Nome = ""; int Numero_de_Materias = 0; int Numero_de_Creditos = 0; vector<double> creditos (10); vector<double> Coeficientes(10); double …

Member Avatar for Petcheco
0
131
Member Avatar for snippo

Develop a Shipping Information System to help the management of the company to manage the shipments for all the customers Implementation: Once the user runs the program, the menu shown below should appear: 1. ADD NEW CUSTOMER. 2. ADD NEW DESTINATION. 3. ADD NEW SHIPMENT. 4. EDIT EXISTING SHIPMENT. 5. …

Member Avatar for rubberman
-2
114
Member Avatar for Petcheco

Hello, guys. I wrote the code to a Quadratic Equations Solver and I'd like for you to run the program and read the source code and give me tips on what I can improve, what is good and what is bad, suggestions, etc. . #include <iostream> #include <locale.h> #include <math.h> …

Member Avatar for Petcheco
0
276
Member Avatar for Rafael_4

**this is what it should look like, a while loop that repeatedly reads goals,assists, stops when a negative is entered. at the end it calcuates sum, average. donot know how to calcuate sum or average if i dont know how many times the user will enter.** Enter a number of …

Member Avatar for DavidB
-1
236

The End.