49,761 Topics

Member Avatar for
Member Avatar for ReneeJA

Write a program that accepts the name and ID number of 5 students and stores them in an array. After all the students have been entered, the application should display the title “Student Roster” and then list the names in the array. 2D Array. #include <cstdlib> #include <iostream> #include <string> …

Member Avatar for ReneeJA
0
237
Member Avatar for Wayne_2

I have a final project for C++ class that requires us to demonstrat each thing that we've learned, a list of 24 things that range from using binary numbers, to loops to passing arrays and polymorphism and recursion. What I would really like to try is to make a simple …

Member Avatar for mike_2000_17
0
210
Member Avatar for john.kane.100483

Ok so I manage to built the program I want but there are problems. #1 The conversion from octal to decimal is not correct. #2 The conversion from hexadecimal to decimal some answers are correct. #3 I don't know how to character array this program. So what I am asking …

Member Avatar for Schol-R-LEA
0
247
Member Avatar for Wesam_2

Hi, I need some help . Bascially what I have to do is this: what doing cin.get in the prpgram just do space or give value.

0
127
Member Avatar for glamiex

This is the program that I made // Chapter 5, Programming Challenge 8: Math Tutor #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; int main() { int num1, // The first random number num2, // The second random number choice, // The user's choice of problem studentAnswer, …

Member Avatar for Schol-R-LEA
0
787
Member Avatar for Andrei_2

Sample Run ( OUTPUT ) Enter a word: computer The well-ordered words of length 3 that can be formed from the letters in the word "computer" are: cem ceo cep cer cet ceu cmo cmp cmr cmt cmu cop cor cot cou cpr cpt cpu crt cru ctu emo emp …

Member Avatar for samson.dadson.3
-1
147
Member Avatar for shelan619

• The program consists of a Class customer and the Main function. • The class customer contains private data items as item value, interest payment, tax payment and total payment. • The class customer includes two public functions as lease Cal() and lease Show(). • lease Cal() function receives item …

Member Avatar for samson.dadson.3
0
198
Member Avatar for Pyler

How's the result to this 7? void foo(int i){ if(i>1){foo(i/2);foo(i/2);}cout<<"#"<<endl;}

Member Avatar for vmanes
-1
221
Member Avatar for ashley.vanhoesen.7

I need to widdle down a queue of people until one person remains in the queue, that person is the chosen person for a task. The mothod I am writing take the queue of people and a number, which represents a number drawn from a hat. Then the queue is …

Member Avatar for NathanOliver
0
283
Member Avatar for d100man

the "f" for female is not being recognized so it is not outputting what it should and also the count statement is giving out an incorrect format could someone give me some pointers as to what im doing wrong #include<iostream> #include<string> using namespace std; int main(){ int femalecount=0,malecount=0,total; string race,office,sex; …

Member Avatar for Schol-R-LEA
0
109
Member Avatar for MiniApocalypse

Hey guys! Im having problems with a snippit of code ive written. I know this is basic C++ so its a little embarasing that i cant work it out myself. Ive googled the run time error message but im not 100% sure i understand what it means. Unhandeled exeption, access …

Member Avatar for Ancient Dragon
0
346
Member Avatar for Rallici

Dev-cpp 4.9.9.2 Windows 7 Hello I have been using my current version for quit a while and I restarted my computer today and now no matter what I try to compile I always get the return of: [CODE] Compiler: Default compiler Executing g++.exe... g++.exe "C:\Users\Salica\Documents\Cpp\hello.cpp" -o "C:\Users\Salica\Documents\Cpp\hello.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" …

Member Avatar for learner_new
0
2K
Member Avatar for CHETNA_1

is there someone who can explain me this question? i googled about cardinality and i got to know that it means the no of elements in set. question: Take an integer n < 1024 as input from user. Write a function to compute the value of the following function. f(n) …

Member Avatar for rubberman
0
68
Member Avatar for taverasme

Hi all, First time poster here, I've referenced posts here on daniweb in the past and it has always been helpful, thanks! But I can't find the answer to this particular problem here on the forums. I need to write a basic string parser as part of a coding assignment …

Member Avatar for Nikolas9896
0
6K
Member Avatar for Ese

I've tried doing it but it doesnt run The array of real numbers is set. a) To delete from the array positive elements. b) To calculate the sum of negative elements in the array. c) To calculate minimum of positive elements in the array. solve using functions

Member Avatar for StuXYZ
0
142
Member Avatar for mell.mattingly

Hey guys! I have a class program here that I am stuck on. This is my first time officially asking for help, but after studying all avenues and research I still find myself wracking my brain. Most of the code is complete and without error...except for the last bit...of course. …

Member Avatar for Iworlock
0
851
Member Avatar for rron17

#include <windows.h> void gotoxy(int x,int y); int main() { int i; int y=6; int x=9; for(i=1;i!=0;i++) { system("color 1"); sleep(500); gotoxy(x,y); printf("%d",i); } getch(); } void gotoxy(int x,int y) { COORD coord = {x,y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord); } How to change the color when the number changes ? And the color must …

0
97
Member Avatar for john.kane.100483

Can anyone edit this program from "Base 10 to any base" --->>> to "From any base to base 10 with character array" .I would really appreciate this a lot. I use turbo c++ compiler. #include <iostream.h> #include <conio.h> #include <stdio.h> void main(){ char value; char t, u, v; char answer; …

Member Avatar for David W
0
224
Member Avatar for shweta_1

what are the difference between the access specifiers and private and protected ?

Member Avatar for David W
0
77
Member Avatar for shweta_1
Member Avatar for shweta_1
Member Avatar for David W
0
66
Member Avatar for shweta_1
Member Avatar for shweta_1
Member Avatar for RASHMI RAUT

#include<iostream.h> #include<stdio.h> #include<conio.h> class QuickSort{ public: int no_of_elements; int elements[10]; public: void getarray(); void sortit(int [], int, int); void partition(int [],int,int, int&); void display(); }; void QuickSort::getarray() { cout<<"How many elements?: "; cin>>no_of_elements; cout<<"Insert array of element to sort: "; for(int i=0;i<no_of_elements;i++) { cin>>elements[i]; } } void QuickSort::sortit(int x[], int …

Member Avatar for Ancient Dragon
0
247
Member Avatar for rron17

#include <windows.h> int main() { int i; int y=6; int x=9; gotoxy(x,y); //gotoxy(x,y) must be the coordinate that the number lies in. for(i=0;i>1;i++){ printf("%d",i); } getch(); } int gotoxy(int x,int y) {COORD coord = {x,y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord); } //how to make this program that the output is a number that counts …

Member Avatar for vmanes
0
158
Member Avatar for kenneth.leonida
Member Avatar for Nicholas_1

I have seen C++ programs that allow you to type a string (in the case I saw it was a file name) after the name of the program, but in the same command (before pressing enter) when you go to run the program and the program parsed it as it …

Member Avatar for Schol-R-LEA
0
170
Member Avatar for shyrin

Write a program which accepts amount as float and display total number of Notes of $50 , 20, 10, 5, 2, 1, 0.50, 0.20, 0.10, 0.05 For example, when user enter a number, 575.95 the results would be like this... 11 $50 1 $20 1 $5 1 50c 2 20c …

Member Avatar for Schol-R-LEA
0
154
Member Avatar for Clouded One

I am having a lot of trouble working on this program. i am not sure how to make a linked list work with more than just numbers (i only did basic programming) and the book is just terrible, i was wondering if you guys could help me with writing this …

Member Avatar for geolotry
0
403
Member Avatar for rron17

} else{ printf(" \b"); surname[cntr]='\0'; cntr--; goto cc; } } else{ surname[cntr]=nput; cntr++; if(cntr>14){ goto aa; } else goto cc; } } aa: gotoxy(40,14); printf("%s %s",urname,surname); fullname[cntr]='\0'; { char choice; ron: SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11); gotoxy(35,15); printf(" Do you want to enter "); gotoxy(35,16); printf(" another entry? "); gotoxy(35,17); printf(" "); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),116); gotoxy(40,17); …

Member Avatar for ddanbe
0
156

The End.