51,592 Topics

Member Avatar for
Member Avatar for Haneen_1

Hi..please can anybody help me..im beginner and i have a hard assignment i need to write a c++ program that do the follwoing : 1.aske the user to enter two text file the first one containe the text file ,the second one contain list of words in one column Regardless …

Member Avatar for rproffitt
0
51
Member Avatar for NinjaLink

"Write a program that reads in ten numbers to an array. The program then reads the array and displays distinct numbers (i.e. if a number appears multiple times, it is displayed only once)" for example: 1 2 3 4 [B]5 5 [/B]6 7 [B]8 8[/B] 9 1 2 3 4 …

Member Avatar for Nor_492
0
7K
Member Avatar for hamad_2

Q2. Write a method called countOdds in java that takes an array of 10 integers as a parameter which is given by the user. The method counts the odd numbers in the elements and return the count. please can someone help me with this its java programming

Member Avatar for rproffitt
0
37
Member Avatar for Muhamad_7

#include<iostream> using namespace std; int main() { string weekday; weekday= {"Mon","Tue","Wed", "Thu","Fri"}; cout<<"\n Please select day of booking:"; cin>>weekday; cout<<"\n Day of booking:"; return 0; }

Member Avatar for tinstaafl
0
33
Member Avatar for anes1

Implement in c++  Design an invoice class that has the following fields o Name, Item id , price, quantity  Support setter and getter for price and another attribute  2 constructor default one , and another one takes all the parameters  Provide 2 function o Get total …

Member Avatar for rproffitt
0
40
Member Avatar for c++help

i have a program that has one little glitch but i dont know how to fix it. If you can help it would be great. [b][code][/b] int main() { int a, b, c; b=0; c=0; do { cout << "Please enter a positive integer (negative integer to stop):"<< ' '; …

Member Avatar for vishakha_3
0
11K
Member Avatar for Muhammad_263

Write a program to sort elements of the array in this order. The even indexed elements should be in descending order and odd indexed elements must be in ascending order.

Member Avatar for Reverend Jim
0
58
Member Avatar for ferrerjulie
Member Avatar for euubisse12

i am completly stuck with some problems in programming, talking exactly aboutt linked list and some others can anyone help me?

Member Avatar for Naheedmir
0
115
Member Avatar for user56rj

I have an assignment due for my ap computer science principals class and I have no clue on how to do it. I’m willing to pay!!!

Member Avatar for Naheedmir
0
87
Member Avatar for Tiondi gilbert
Member Avatar for ky123

May i knw how to write a program that can set goal, record food/drink consumed and record foodcomposition???

Member Avatar for Prasad_9
0
114
Member Avatar for Nelam parveen
Member Avatar for Gowri_2

Let's have a file containing readings from the measuring apparatus in the range 0 to 100 with an accuracy of 1 - the file contains only space separated integers. The file can be huge (several dozen GB), so it isn't possible to load it in extenso into the computer's memory. …

Member Avatar for rproffitt
0
68
Member Avatar for youssef_8
Member Avatar for TheNewKid

Hey guys, I have been looking around for a while but I can't seem to find any tutorial on how to print the contents of a RichEdit to a printer. Any help would be appreciated and if anyone has any links to a good tutorial please post them. Thanks! TheNewKid

Member Avatar for Greg_21
0
577
Member Avatar for dltang1999
Member Avatar for Batrancea

To realize a function of reading from the file in the structure. in c++ Example using namespace std; struct user char name [40]; char first name [40]; char email [50]; char word [50]; float balcony; ; v [100]; The function will train to read the information from the file in …

Member Avatar for rproffitt
0
34
Member Avatar for Syed_26
Member Avatar for newnew1234

how do i skip a char in filestream? i tried the ignore function but that doesnt work in filestream, i also tried using an array[i] and said if(arr[i]=="-") then i++ while outputting but that doesnt work either

Member Avatar for rproffitt
0
77
Member Avatar for eslam ashraf

Mr.Sadik and Ramadan are competing together, both of them wants to become expert on Codeforces first. You will be given two numbers R1 and R2, where R1 is the current rate of Mr.Sadik and R2 is the current rate of Ramadan. Can you determine who will become expert first after …

Member Avatar for Dani
0
154
Member Avatar for Huzaifa Ehsan

The value of π can be determined by the series equation π =4 * ( 1 −1/3+1/5 −1/ 7+1 /9− 1/ 11+1/13+... ) Write a recursive function that takes an odd number n and uses recursion to approximate the value of π using the given formula including term up through …

Member Avatar for Reverend Jim
0
511
Member Avatar for Ken_526

having problem in coding a small system, which can let user to key in the input and save it into txt before checking the txt file whether the data is duplicated or not

Member Avatar for Naheedmir
0
43
Member Avatar for Huzaifa Ehsan

Can any one help to write code for this ? recursive function to count total number of consonants in it. Your function should return the count of consonants.

Member Avatar for rproffitt
0
45
Member Avatar for Muhammad Hassan_1

program to find the structure of teacher and student lecture in c++ classes

Member Avatar for rproffitt
0
74
Member Avatar for Seidu
Member Avatar for marci539

Write a program that reads a telephone number from a file phnum.txt (available in lab folder) in the form xxx-xxxx. The first three digits represent an area code and the next 4 digits represent the phone number. Your task is to print these numbers into another file (outFile.txt) without any …

Member Avatar for Dani
0
144
Member Avatar for Nymphalys08

Hi, how do you read multiple data types in a file and storing it in a linked list. I read the items with no linked list but when I used linked list it doesnt work. I think there is something wrong in my code. Programming language: C++ Thank you struct …

Member Avatar for pospisil80
0
193
Member Avatar for mollyrock705

![Inked235345364566556546_LI.jpg](https://static.daniweb.com/attachments/4/b5bf788aff340f6e41ee2b6d28f1f5c9.jpg) Sample output: Enter number of guests: 40 40 guests have been invited. Enjoy the party!

Member Avatar for loveboat
0
457
Member Avatar for shaista jabeen

// complete the following code. // Do not use 2-D array, such as int a[2][3]; #include <iostream> #include <stdlib.h> using namespace std; // implement the functions : add, sub, mult, transpose class Matrix { public: Matrix(int row, int col); int GetData(); Matrix Transpose(); int Display(); Matrix Multiply(Matrix b); Matrix Add(Matrix …

Member Avatar for Juan_23
0
234
Member Avatar for Onion13

Learning C# and I am working on a C# scrolling shooting game. The game works so far but when the player finishes a level, I want the enemies to appear on the far right of the screen and the player on the left of the screen. When the level is …

Member Avatar for Onion13
0
318
Member Avatar for thomasdoejr

Write a program using for loops to produce an R by C rectangle, where R and C are provided by the user. The following are the triangles for different values of R and C. R is the number of rows and C is the number of columns

Member Avatar for rproffitt
0
350
Member Avatar for <iostream>

guys sorry about my post earlier . this is what i did with my program but i dont think my equation is correct because whenever i want to get the total amount due it always give the wrong amount . i dont thinks this equation is correct "amount=amount+price*quant;" guys i …

Member Avatar for Amiira ahmet
1
9K
Member Avatar for Ranniel
Member Avatar for priyamtheone

I'd like to know how the following programme on pointer written in C can be written in C#, especially how to use the keywords in the C programme like &i and \*p in C#. Please clarify. #include <stdio.h> void f(int *p, int *q) { p = q; *p = 2; …

Member Avatar for JamesCherrill
0
122
Member Avatar for damiennorris

Hello, I hope someone can help because I am really confused :( I have some code that I am ruining on an Arduino to start a race - Take your marks, Get set, Go - type of thing and some LED's that act in a very similar way to the …

Member Avatar for rproffitt
0
456
Member Avatar for @jassmine97

hello, i barely know how to use python and i need to write a cubic spline interpolation code in python for my programming assignment . I have C++ code but i know nothing about c++ so can someone help me to convert that code to python code? this is a …

Member Avatar for rproffitt
0
205
Member Avatar for Laith_5
Member Avatar for Laith_5
Member Avatar for Sph_1

im having a issue with a code on AuthServer.cpp giving me the error above, can u help me fix it ?? //----------------------------------------------------------------------------------- // Auth Server //----------------------------------------------------------------------------------- #include "stdafx.h" #include "AuthServer.h" #include "mysql.h" Database* db_acc; Database* db_log; CAuthServer::CAuthServer() { m_pMasterServerSession = NULL; m_pClientAcceptor = NULL; m_pServerConnector = NULL; } CAuthServer::~CAuthServer() { …

Member Avatar for rproffitt
0
229
Member Avatar for Abby_4

Hello! I know it isnt very appropriate, but I have already posted this question on stackoverflow. However, this is a very time sensitive issue and I still need a great amount of help with it and havent gotten any responses there. With that said, I hope that you guys may …

Member Avatar for rproffitt
0
60
Member Avatar for Damien_6

Hello, I hope someone can help because I am really confused :( I have some code that I am ruuning on an Arduino to start a race - Take your marks, Get set, Go - type of thing and some LED's that act in a very similar way to the …

Member Avatar for Rahul_111
0
127
Member Avatar for AmerJamil

i have a question that. is it not possible that main do not return any value, and the returning value of main is void, why returning value of main should always be int, when we write [code] void main() { } [/code] mostly people here on DANIWEB ask to write …

Member Avatar for EricStens
0
2K
Member Avatar for Hank40

error: expected unqualified-id before '{' token ![Screenshot_2021-03-04_at_8_42_59_AM.png]( https://static.daniweb.com/attachments/4/51fafe4f14ed095fd30745da3cbad862.pngg Hi guys I need your help. I am learning C++ on shell. I am trying to make it so you can make and answer. Can you help me?

Member Avatar for rproffitt
0
53
Member Avatar for maaru1903

Is there a standard algorithm that can output the difference time (in seconds) and use it to print the minutes, hours, numbers? I would appreciate it if you show this algorithm in Flowgorithm app.

Member Avatar for rproffitt
0
59
Member Avatar for Noobie*

I am a first year student who only knows common codes. I have created a simple cashier program wherein you will only type the number assigned to your order (used of arrays) and calculate the total of the orders,change etc. It was all clear on that part but I am …

Member Avatar for John_165
0
50
Member Avatar for pags920

My assignment in my class is to create a palindrome program for any given string. The main function is supposed to call an integer function named InputString that reads the characters of length n and it needs to determine if its a non-zero length. If this is so, another function …

Member Avatar for gravity_1
0
2K
Member Avatar for harkw002_UniSA

Unable to open file with fstream. it always seems to jump to the else statement and gives me the error message "Error: can't open input file ". I have included in the header file [CODE]#include <iostream> #include <fstream> #include <sstream>[/CODE] and in the class file i have the following code …

Member Avatar for Sandy_9
0
11K
Member Avatar for gabby_1

#include <iostream> using namespace std; int rankfun(double left, double right){ int rank; if(left < right){ rank =-1; } else if(left > right){ rank = 1; } else{ rank = 0; } return rank; } int main(){ double number1 = 1.7; double number2 = 2.3; int result; result = rankfun(number1,number2); cout …

Member Avatar for Khalil Cooper
0
2K
Member Avatar for Dervish1

I'm trying to learn how to do some simple things with MFC - I'm not used to the toolkit. I want to load a png image from disk and display it at a chosen location in the program's window, but am getting a debug assertion error: atlimage.h Line: 1624 Expression: …

Member Avatar for rproffitt
0
243

The End.