49,761 Topics
| |
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> … | |
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 … | |
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 … | |
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. | |
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, … | |
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 … | |
• 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 … | |
How's the result to this 7? void foo(int i){ if(i>1){foo(i/2);foo(i/2);}cout<<"#"<<endl;} | |
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 … | |
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; … | |
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 … | |
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" … | |
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) … | |
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 … | |
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 | |
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. … | |
#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 … | |
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; … | |
what are the difference between the access specifiers and private and protected ? | |
what are the different form of inheritance supported by c++? | |
write a program which explain the use of reference variable. | |
#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 … | |
#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 … | |
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 … | |
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 … | |
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 … | |
} 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); … |
The End.