51,593 Topics

Member Avatar for
Member Avatar for Supremo_1

I want to create a program that enables user to input 90 entries (90 questions' answer ranging from A to D)(1 answer per Question) and when it feeds the input, the program checks the entries with its randomly generated answer keys. (+4) for every correct entry (-1) for every wrong …

Member Avatar for rproffitt
0
178
Member Avatar for yosri_1

hi all, im realising motion detection that compare two successive frame saved in directory , using OpenCv but, the code is successfully debugged, but when i run the app it displays an exception, any help please ![fd.png](/attachments/large/4/15ef48aa38ace106bfefbeb623106185.png "align-center") my source code #include <iostream> #include <fstream> #include "opencv2/opencv.hpp" #include "opencv2/highgui/highgui.hpp" #include …

Member Avatar for rproffitt
0
3K
Member Avatar for Phuzzy_1
Member Avatar for Khaled_9

I have input string in shape of:polygons=[(4,5),(6,8),(5,3),(11.4,6);(3,8),(2,9),(1,2)],each semicolon tells me 1polygon entered user can input up to 100 polygons and 100 points in each polygon i want to store the x- coordinates of all points in 2D array how can i do that in c++? User can input any value …

Member Avatar for AssertNull
0
254
Member Avatar for Naeem_1

Write a program that will ask the user to enter lower limit and upper limit in form of integers. The program will calculate and show the prime numbers within the range from lower limit to upper limit. All the prime numbers within the specified range should be displayed on the …

Member Avatar for thines01
0
143
Member Avatar for Joe_29

Requirements: Use a class, an array, file input/output. Goal: Compare the student answers (.txt) to the answer key (.txt) and output the students name, missed questions and overall score to a .txt. Firstly, is my design decent? What I need to do now is to compare student answers to the …

Member Avatar for thines01
0
288
Member Avatar for Mirty

I need help with some questions.They were 20 of them but this 5 have been so hard for me. Any help I get will be highly appreciated. Cheers!!! 1.When mergesort is implemented on a linked list it is possible to implement it as a stable sort. True or False? These …

Member Avatar for Mirty
0
291
Member Avatar for Prasad_4

Consider the following C code snippet: char *sentence = NULL; strcpy(sentence, "Helloworld"); printf("%s", sentence); is the code segment correct or error. If correct what is the output? 1. Error 1. Helloworld 1. NuII,Helloworld 1. None of the above

Member Avatar for Reverend Jim
-2
1K
Member Avatar for AmerJamil

i have to get 2 numbers (each of length 20 digits) from user and have add them and display the result (using arrays) . i have no idea how to add such a long digit number...please tell me how can i add both numbers. your quick response will be highly …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Joe_29

I have an assignment to output contents from a .txt file to html. I'm able to output the information from the .txt to the console but how would I output it into an html page? The txt and html files are in the same folder as my .cpp file. #include …

Member Avatar for rproffitt
0
303
Member Avatar for tpetter1

I'm trying to write a Windows service in Visual Studio 2008. The service is supposed to update an Access database. I've created a Windows service project and added an Access database to the project. A data source has been created that contains all tables from the database. Now to my …

Member Avatar for scott_16
0
3K
Member Avatar for Amall_1

i want to search a record in a file and get its size in c++ and fstream, thanks in advance

Member Avatar for tinstaafl
0
91
Member Avatar for Henzolena

>I need help! >is there any body can help me with it? 1. write a C++ program that will ask the user to keep entering numbers until a number between -20 and 20 is entered, find how many negative and positive numbers were entered, also the smallest negative number and …

Member Avatar for Reverend Jim
0
105
Member Avatar for lolici

Hello everyone! I have created an editable list control (report style) with numbers. I want to save the content in a text file (each number below the other) and I used void CDataDialog::OnBnClickedOk() { CStdioFile file("test.txt", CFile::modeCreate); int nCount = m_List.GetItemCount();//m_List is control variable declared about list control for (int …

Member Avatar for thines01
0
399
Member Avatar for Hasnain_1
Member Avatar for Agni

Hi, i have seen a lot of ppl say things like, 'this piece of code is more efficient than the other', 'this gives better performance' or 'more efficient memory wise' etc.. but i fail to understand that how in a normal coding scenario can i find out the efficiency of …

Member Avatar for Magee_1
0
3K
Member Avatar for sheltask

First I was on that console window, and everything seemed easy because I could break everything down and knew EXACTLY what I was doing to get what I wanted done. However, that boring text-window got tiring. I decided to move on, but that was the biggest mistake ever. For over …

Member Avatar for Less_1
1
835
Member Avatar for Noname_1

Hi all, I have to solve a tripple sudoku. The program is supposed to solve the enlarged sudoku. We load 21 rows, each with 9 integers in the range <0.9>. Rows 1-9 (numbered so that the first line is numbered 1, etc.), 7-15 and 13-21 are to create a classic …

Member Avatar for Reverend Jim
0
486
Member Avatar for Ummu_1

I have been trying to write a program of c++ of function of array for summation of odd numbers could I please get help on how to do it?

Member Avatar for ddanbe
0
119
Member Avatar for gugushe

i got the following error when compiling a word count program, **error: expected unqualified-id before '.' token*.*; this error is at line 5 //class Split_file.hpp. #ifndef SPLIT_FILE_HPP_H #define SPLIT_FILE_HPP_H class Split_file.hpp { Split_file.hpp(); virtual ~Split_file.hpp(); protected: private: }; #endif // SPLIT_FILE_HPP_H

Member Avatar for tinstaafl
0
1K
Member Avatar for Anna_12

I am trying to sort the scores in ascending order but I do not have any idea to do sorting in class. Any help will be appreciatd.

Member Avatar for Nihar_2
0
276
Member Avatar for John_159

very new to c++ . have an assignment when am to input some information about an item and write to a file . Have succesfully done that but now i i dont know how to delete a line of entry from the text file and save it . look at …

Member Avatar for Nihar_2
0
12K
Member Avatar for Nomar_1

Ok I need to make a 3 part program thats made with c++. The first part is to write 10 number, and then program ask to ether repeat the number or to reapeat them reverse. Second part I need to make a program that ask for a word and later …

Member Avatar for StuXYZ
0
355
Member Avatar for rjadkins

I need to make a spin coater machine. It spins in 3 stages and each stage have different speed(servo value) and time ( how long for it to spin). A lot of people recommended that I use FSM. I have decided to do the programming in FSM. I manage to …

Member Avatar for rjadkins
0
294
Member Avatar for Joe_29

This is a rock, paper, scissor, lizard, spock game. The computer's decision making is set up in the class and all input/output must take place in main. I am struggling with a few things: Setting up a score keeper - unsure how to keep score by comparing the output of …

Member Avatar for rproffitt
0
597
Member Avatar for DavidB

I have translated many numerical math programs from FORTRAN into C++ and JavaScript. The original FORTRAN source code listings are posted on the NETLIB site and have been in the public domain for 20, 30, years. The C++ and JavaScript translations that I write are hand-coded, line-by-line, and repeatedly tested …

Member Avatar for pty
1
391
Member Avatar for guest_1

Hey, I would some assitance, I wrote this code to find the average between the max and the min and assign that value to the nan, nut i have to chnage up my code, to assign the NaN to the previous non-zero value. Example 112 113 114 116 NaN would …

Member Avatar for JamesCherrill
0
329
Member Avatar for Mirty

Write a function write with variable number of arguments that takes a string first argument followed by any number of arguments of type double and prints on the screen a string formatted by the rules described below. The first argument may contain formats in curly braces of the form {index[:specifier]}, …

Member Avatar for AssertNull
0
460
Member Avatar for Maram_1

Write a C++ program to help the Administration of a football league to manipulate the list of players registered in different teams. There are 26 teams participating in the league, each is denoted by a letter in the range A to Z. Each team can have 11 players at most. …

Member Avatar for rproffitt
-1
305
Member Avatar for clarkkent021

Hi, I am trying to learn OOP with c++ with the help of Turbo C++ version 3.0 and "C++ Primer Plus" by stephen prata. according to the book, the NEW convention for including the iostream header file in c++ is in the following way: #include<iostream> but it causes an error …

Member Avatar for Aatulya
0
2K
Member Avatar for Lindsey_4

Hello. In my assignment, I must use nested loops to write to and read from a file. We have not yet learned functions or arrays. The program should calculate and display total rent collected, average rent collected, the highest paying complex, and a warning if zero paid by a complex. …

Member Avatar for AssertNull
0
342
Member Avatar for Vokeh

#this program calculates the area of a right triangle #ask for input b=input('Enter the triangle base:') h=input('Enter the triangle height:') #Calculate and print area Area=(b*h)/2 Print '\n The base is '+str(b) + 'units' Print 'The height is 'str(h) + 'units' Print '\n The area is 'str(area + 'units'

Member Avatar for ddanbe
0
128
Member Avatar for d1e9v85

hi guys ... this is a bubble sort program that i made [code=cplusplus] #include<iostream> using namespace std; #include<iomanip> using std::setw; int main() { const int arraysize = 10; int Bubble[ arraysize ]; cout << "Please enter 10 integers: " << endl; for ( int i = 0; i < arraysize; …

Member Avatar for White_2
1
765
Member Avatar for Justin Kent

hi i just wanna ask because the submission of my restaurant POS System will be tomorrow. it is a very hard time for me. here are the requirements: Restaurant POS (Point of Sale) System Create a basic Restaurant Point of Sale software using C-Language. Your restaurant must have at least …

Member Avatar for rubberman
0
9K
Member Avatar for MUHAMMAD_138

/* #include<iostream> #include <iomanip> using namespace std; int main() { int r=12,i,j,k; cout<<setfill(' ')<<setw(18); for(i=1;i<=r;i++) { j=r-0; if(i==12) { cout<<j; } } for(i=1;i<=r;i++) { j=r-11; k=r-1; if(i==1) { cout<<endl<<endl<<setfill(' ')<<setw(10); cout<<k; } if(i==2) { cout<<setfill(' ')<<setw(15); cout<<j; } } for(i=1;i<=r;i++) { j=r-10; k=r-2; if(i==3) { cout<<endl<<endl<<endl<<setfill(' ')<<setw(6); cout<<k; } if(i==4) …

0
279
Member Avatar for guest_1

I'm new to c++ and the programming world, I'm currently trying to write a code to find the max and min values and their average and assign the average obtain to a zero within a text file. Data.txt 110 109 109 109 110 111 112 113 115 112 0 103 …

Member Avatar for ddanbe
0
134
Member Avatar for francis_6

you have been contracted as a software develper to design a point of sales system, the system is to work in a way that ,if a customer purchase an item on credit and it cost more than or equal to $100 the system should alert the sells personnel that sells …

Member Avatar for happygeek
0
148
Member Avatar for MUHAMMAD_138

**please help me i want to make a circular clock** Write a program to simulate an analog watch (number 1 to 12 to be arranged in circular fashion with all the three pointers for second minutes and hours ) on the screen. Use nested for loops. Use (.) dot for …

Member Avatar for rproffitt
0
459
Member Avatar for ReneeJA

Please, i need a teacher to help me out...i am at the intro stage and i was wondering if someone would walk me through this please..i would appreciate it. Mr. Clark employs students who are exempt from taxes and others who are not. Write a program that will calculate and …

Member Avatar for owlowl076
0
1K
Member Avatar for Jhai_1
Member Avatar for tegaelam

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: ++++++++++ …

Member Avatar for Reverend Jim
0
3K
Member Avatar for mariam_6

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 …

Member Avatar for nullptr
0
185
Member Avatar for daino

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 …

Member Avatar for deceptikon
0
43K
Member Avatar for Andrew_39

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 …

Member Avatar for Johan_1
0
7K
Member Avatar for Rodrigo_5

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

Member Avatar for tinstaafl
0
319
Member Avatar for a_8

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 …

Member Avatar for rproffitt
0
72
Member Avatar for hegindra

#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 = …

Member Avatar for JamesCherrill
0
580
Member Avatar for Gamal_3

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 …

Member Avatar for Gamal_3
0
321
Member Avatar for Dick_2

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 …

Member Avatar for Dick_2
0
2K
Member Avatar for noname_5

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 …

Member Avatar for AssertNull
0
945

The End.