49,761 Topics
| |
# 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 ??)) # | |
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. | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
write aprogram in c++ using for loop to calculate the max number and min number and make the avg >>in output screen? | |
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? | |
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 | |
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]; … | |
*****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; } | |
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. | |
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 … | |
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 … | |
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) … | |
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; … | |
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 … | |
#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() … | |
i need a c++ code which explain insertion and deletion of nodes from any position | |
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 … | |
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. … | |
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> … | |
**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 … |
The End.