49,761 Topics
| |
Hello all, I am having issues with a homework assignment. My assignment is as follows: Write a program that uses a loop to display Pattern A below, followed by another loop that displays Pattern B. Pattern A: + ++ +++ ++++ +++++ ++++++ +++++++ ++++++++ +++++++++ ++++++++++ Pattern B: ++++++++++ … | |
Write a function multiple that determines for a pair of integers whether the second integer is a multiple of the first. The function should take two integer arguments and return 1 (true) If the second is a multiple of the first, and 0 (false) otherwise. Use this function in a … | |
Would anyone know how to put user input into a Char Array. I've provided the code below It doesn't work so I've tried many variations like making char wrd as char wrd[20] but still nothing. I think I'm missing a fundamental point here. All I want to do is have … | |
Hello i been doing some program of my own, my program is to get the number of days paased in the year. I am having hard to get get the passed in the year. Now when i try to run and the output gives me "4438232", i am really having … | |
Develop a C++ program that finds the minimum of 4 even numbers entered by the user.? The program should display the following grades if the minimum value is found within the given interval; 60-100 A 40-59 B 30-39 C Below 30 Fail | |
Write a program in c++ that ask the user to type 10 integers of an array and an integer value X, the program must put the value X in the index 0, shifting each element right and dropping of the last element. The program must write the array before and … | |
#include <iostream> #include <stdlib.h> #include <unistd.h> #include <time.h> using namespace std; int createZombie() { if (rand() % 67 < 10) return 11; else return rand() % 10 + 1; } int main() { srand(time(NULL)); char enter; // game starts int playerAlive = true; int playerSkill = 9; int playerScore = … | |
can anyone help me with this assignment, Please. __________________________________________________ The brightness of a binary star varies as follows. At time t = 0 days its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is then determined by the formula 3.355-ln(1.352+cos(PI(t-0.9)/0.7)) Until t … | |
Hello, So I am trying to read a text file into an array, but I am having issues breaking it up properly. Here is my text file: 0 Car Fixed 1 Brake 2 Windshield 3 Tires 4 Engine 5 Doors 6 Transmission and here is my code: #include <iostream> #include … | |
Hi there, I am stuck with a problem, and don't know where to start. I need to calculate the closest pair of points on the Earth using a divide and conquer method. I know I should calculate the orthodromic distance (or in other words the great-circle distance) but I don't … | |
Suppose I'm running a loop and the loop should continue unless I get a garbage value. So what will be the terminal condition. How can garbage value be checked in if condition? | |
I have the following code and i dont understand why P4(3,7)is giving returnvalue true (1) , since here 7(ConTemp.XYCoord[1]) is bigger than 5 (ReCoordRo.XYCoord[1]), so i would like to know a way to monitor the boolean Rechteck1.contains(P4), watch windows doesnt give me that option, so how do i go about … | |
This is the result after applying trained svm..i don't know why i got support vectors as 0's and why i got uncompressed support vectors. Can someone help me? <?xml version="1.0"?> -<opencv_storage> -<opencv_ml_svm> <format>3</format> <svmType>C_SVC</svmType> -<kernel> <type>LINEAR</type> </kernel> <C>1.</C> -<term_criteria> <epsilon>9.9999999999999995e-07</epsilon> <iterations>1000</iterations> </term_criteria> <var_count>8</var_count> <class_count>2</class_count> -<class_labels type_id="opencv-matrix"> <rows>2</rows> <cols>1</cols> <dt>i</dt> <data> … | |
Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the following way: John Jacob Schmidt Jane Marry Roe … The program should take each name from the file into a string and display each part … | |
Below is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; ///////////////////////////////////////////////////////////////////////// /* // struct Edge // Represent one edge in the graph. Fields contain // two vertex numbers and a weight. */ struct Edge { int vertex_1, vertex_2, weight; }; //////////////////////////////////////////////////////////////////////// /* // struct Graph … | |
I am writing a program that reads a comma-delimited file. There are several words on each line that will each be assigned to a string variable, each line in the file is a record, and the file contains several records. I am using getline with a delimiter, e.g. [B]getline(inputstream, string, … | |
for (UINT wCount = 0; wCount < pMan->aAccounts.wNumItems; wCount++) { CUserAccount *pAccount = (CUserAccount *)pMan->aAccounts.aItems.GetAt(wCount); if (pAccount->csProfileName.Compare(pGroup->csProfileName) == 0 || pAccount->csSingleActive.Compare(pGroup->csName) == 0) { if (pAccount->_csUserGroup.CompareNoCase(_T("GrpAdmin")) != 0 && pAccount->_csUserGroup.CompareNoCase(_T("GrpOffice")) != 0) { pAccount->pFuncRestrictions->SetRestriction(Area1, Activity1); pAccount->pFuncRestrictions->SetRestriction(Area2, Activity2); pAccount->pFuncRestrictions->SetRestriction(Area3, Activity3); pAccount->CreateInDatabase(pConnec); } } } Here, my code is calling CreateInDatabase twice … | |
Warning: I am brand new to programing. I am trying to create a random letter generator game for a class project. I feel like I have a good start to it but I am having difficulty with a few points. The program is supposed to ask the player how many … | |
im having a problem controlling a stepper motor using a microcontroller..what i did is that i test it with my board coz it has led's to check whether its working or not..we are tasked to make a program in c++ that would make a variable reluctance stepper motor work. If … | |
Hi, Below command will give the cpu and memory usage of process in terms of percentage. can we achieve same usin c/c++ API. ps -C <process name> -o %cpu,%mem | tail -n 2 | |
// This program uses a switch-case statement to assign a //letter grade (A, B, C, D, or F) to a number test score. #include<iostream> using namespace std; int main() { char grade; int testScore = 10; cout << "Enter your test score and I will tell you\n"; cout << "the … | |
I have a save function like noraml tool (Ctrl +S). I have a command line argument that is defined as (-A). I have to use this -A to perform the save function automatically. If I pass the command in Linux for eg: " ToolName -A ". It has to save … | |
I want to use euclidean distance to match the predicted support vector with the tested support vector. I need to set a distance threshold and calculate the distance between predicted label and tested label. If the calculated distance <= distance threshold, then it will be a match, else a non-match. … | |
Most common quiestion is: [quote]Is there any C++ GUI API?[/quote] My answer is MANY. There are many API's for making GUI applications. Here are some. [B] 1. WinAPI: (C based)(MFC is C++ based)[/B] [I]Its a great API and the best solution if you are windows programmer. First code will look … | |
I already have a save function in my tool as like a normal tools. Now I would like to add auto save function , that has to save all the operation that made in the tool(we called that overlays). I need to write an auotsave function and I have to … | |
I am looking for log archival utility or approach which should be able to help me in based on below policy. (1) whenever log file (system.log) size >30859 or file is 3 day old then it should archive the same with new name system.log1 and again start the feeding the … | |
Write a C++ program that inputs the number of students in a class and the number of tests and the grades of the tests conducted by each student, then it calculates the average of the student and outputs related information as given below. The Average of a student is calculated … | |
Amazon is Hiring! A job at Amazon is unlike any other you have had. You will be inspired, you will be challenged, and you will impact the future of the technology. This is for some very unique technical projects for Amazon technical development teams (eCSG & Retail systems) in Canada … | |
Good afternoon, I have to create a program to only be used as a tool (no main function). Below is the background information related to task: Your goal for this assignment is to create a tool that manages an equivalence relation that can be changed by the program. The equivalence … | |
the compiler compile the code,but traversing output is wrong .please chech ny logic is correct,tell me best tutorial to learn of binary tree using stack . void usman:: inorder() { stack<node*>s; node *t=root; while(!s.empty()||t!=NULL) { if(t!=NULL) { s.push(t); t=t->left; } else { t=s.top(); s.pop(); cout<<t->data<<","; t=t->right; } } } |
The End.