49,761 Topics

Member Avatar for
Member Avatar for ViperVenomHD

Hi guys. I am trying to create a program where the user inputs an integer and the program will cout the nth prime number. Unfortunatly when I try to cout just the nth prime number it doesn't work. However theoretically if I have the program print out all of the …

Member Avatar for tinstaafl
0
866
Member Avatar for Adeniyi_3
Member Avatar for Reverend Jim
0
99
Member Avatar for Marwa_3

Write a program to read a literal string ptr1 for no longer than 20 characters. Then use a function whose task is to all contents of ptr1 t ptr2 except for the letters n, f, a.

Member Avatar for rproffitt
0
89
Member Avatar for vishalonne

Hello Everybody I want to print the value of alternative element of a 2D array. For Example- 23, 54, 76 37, 19, 28 62, 13, 19 Output should be- 23 76 19 62 19 I am trying to get this output since 5 hours. Here is my code - #include …

Member Avatar for DIVYANSHI MANGAL
0
1K
Member Avatar for Muhammad_122
Member Avatar for Usama_9

I declare an integer and input value from user when i check this program i give the value 40,000 its a overflow but program generate no any type of error why?

Member Avatar for JamesCherrill
0
197
Member Avatar for Godwin_3

urgent need: write a computer program in c++ that solves a linear simultaneous equation of 10 variable

Member Avatar for Reverend Jim
-1
665
Member Avatar for Sam David

Project C++: A player engine for RPG fighting Hello everyone, I'm beginner programmer and got a task to finish but I'm lost. Please help me to start the project: An engine is needed to create a player and non-playable character objects. Players will require an inventory of Weapons, Armor, and …

Member Avatar for Sam David
0
495
Member Avatar for ckide

i like c++, Is C++ enough to bring me a job or should i study something else?

Member Avatar for rubberman
0
475
Member Avatar for Petar_1

NEED THE CODE FOR THIS: The University wants to make a basic graphical display to show how many people received different grades for a piece of work on a module. You are required to write a program in C++ that achieves this. The program is in a number of parts. …

Member Avatar for rubberman
0
318
Member Avatar for Harish_8

I have developed a player v/s player game for tic tac toe..but can't understand the logic for AI ..can someone please include the AI segment in my code because i so much need it for my school project #include<iostream.h> #include<conio.h> #include<string.h> char grid [3][3]; void display_grid() { for(int i=0;i<3;i++) { …

Member Avatar for JamesCherrill
1
563
Member Avatar for zaka_1
Member Avatar for Bob

[B]Intro[/B] This tutorial provides a brief introduction to the random number functions that come as part of the C++ standard library, namely rand() and srand(). [b]rand() and RAND_MAX [/b] The C++ standard library includes a pseudo random number generator for generating random numbers. In order to use it we need …

Member Avatar for JamesCherrill
3
53K
Member Avatar for Black Magic

Hey, i was just mucking around and improving my code etc and made a calculator, it's not the best calculator in the world, it only can handle 1 or 2 numbers but i think it's good my self :).

Member Avatar for Reverend Jim
0
5K
Member Avatar for roaa_1

define an array with 12 month/rows and 31 days/columns for a year's temperature data in a main function. One subtask is to write a function and call it from main reading a text file with mean temperature data of one year and store read data into this array. For example, …

Member Avatar for khai_2
0
620
Member Avatar for Paul Brian

convert from: loops properly convert to: loops back to from (should just loop back to convert to:) need some guidance #include<iostream> using namespace std; int main() { int num; char ch='y'; int amount; int choice1,choice2; while(ch=='y'||ch=='Y') { do { system("cls"); cout<<"\t\t|DLSL CURRENCY EXCHANGE PROJECT |"<<endl; cout<<"convert currency from: "; cin>>choice1; …

Member Avatar for tinstaafl
0
245
Member Avatar for jnneson

Hello, Please, i dont know why my implementation is failing the testDemo Fucntion.. Below is the full code. it is Failing operator < .... testLessThan interface: #ifndef DATE_H_ #define DATE_H_ #include<iostream> using namespace std; class Date; ostream &operator<<(ostream&, const Date&); istream &operator>>(istream&, Date&); class Date { private: int month; int …

Member Avatar for jnneson
0
307
Member Avatar for abdisa
Member Avatar for Paul Brian

#include<iostream> #include<fstream> #include<string> #include<windows.h> using namespace std; void mainMenu(); void viewtable(); int main() { mainMenu(); return 0; } void mainMenu() { int num; char ch='y'; while(ch=='y'||ch=='Y') { do { system("cls"); if(cin.fail()) { cout<<"Invalid Input..."<<endl; cin.clear(); cin.ignore(500,'\n'); } cout<<"\t\t|DLSL CURRENCY EXCHANGE PROJECT |"<<endl; cout<<"\n\n"; cout<<"1-View Latest Global Currency Exchange Rate\n"; cout<<"2-Update …

Member Avatar for rproffitt
0
4K
Member Avatar for Tyron_1
Member Avatar for Reverend Jim
0
357
Member Avatar for nonik

please help me, create an algorithm that can be used to spell out a positive number worth less than 1,000,000 and create a c ++ program for the algorithm

Member Avatar for stultuske
0
378
Member Avatar for Khalid_12

Hi, I have been given a project to finish in school in 3 phases, the thing is I am not that good when it comes to programing. The project was to develope a tic tac toe game as following: **Phase 1: Write a program that will first ask the user …

Member Avatar for Sinisa_1
0
511
Member Avatar for JHus00

I need to convert hours into weeks, days, and hours. My professor was hinting that there might be a way to do this using the modulus operator but I can't seem to think of a way that its possible. Can anyone help? thanks!

Member Avatar for cereal
0
4K
Member Avatar for veiLrn

Hi, I'm new on this forum, but a friend directed me here to seek further assistance with a program I am trying to create. I have to create a program that can manage 10 bank accounts, one of which uses appropriate type definition to store the name, account number, balance …

Member Avatar for ASIF_21
0
32K
Member Avatar for Nrsrh

I'm having a problem with the program i did. The problem is ; It says that the conversion ( for the grade part , the ones with '+' and '-') may lose it's significant digit.. Does it mean that i can't use the plus symbol or the minus symbol ?? …

Member Avatar for Nrsrh
0
2K
Member Avatar for sgw

Why doesn't the code (2) below produce the same output as the code (1)? Let's say you entered "4" as input: (1) int x; cout << "enter integer: "; cin >> x; cout << x++; cout << ++x; cout << x; The output of the above is "**466**" (as expected). …

Member Avatar for sgw
0
585
Member Avatar for Lana_3

Write function quality points() that inputs astudant s average and return 4 studant s average is 85 100 ,3 if the average is 75 85 2 if the average is 7565,1 if the average is 65 50,0 if the average is lower than 50, the program prints "excellent" if the …

Member Avatar for Reverend Jim
0
154
Member Avatar for Sarah_23

A children's game of 'count out' is played as followed. '40' children are arranged in a circle, a sentence containing of 'm' words is used to eliminate '1' child at a time until '1' child is left. Starting at child '1' the children are counted from '1' to 'm' and …

Member Avatar for rubberman
0
319
Member Avatar for Prathamesh_1

THIS SOURCE HAS printf STATEMENT WHICH IS TO BE REPLACED WITH cout STATEMENT. PLEASE HELP ME....... :) #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<time.h> int a[9][9],b[9][9],r[60][2]; int row, col, icount, mode; char solh; void main() { void readvalues(void), display(void),generate(void); int solve(),checkmat(), checkrow(), checkcolumn(),check(),isfixed(); int i,j,error; char c; clrscr(); prinf("\n\t\t\t SUDOKU GAME by:\n\n\t\t\t \n\t\t\t …

Member Avatar for rubberman
0
495
Member Avatar for Saanvi
Member Avatar for xrjf
0
518

The End.