49,761 Topics

Member Avatar for
Member Avatar for Arsh_2
Member Avatar for fugnut

I would like to have the user enter ctrl-z to end the program...can someone tell me how to insert this into the following program? [CODE]//Program to calculate greatest common denominator of two integers #include <iostream> using namespace std; int calcGCD(int, int); int main() { int a, b, res; cout <<"This …

Member Avatar for mohammad reza_1
0
7K
Member Avatar for soso_2

write a program that asks the users to input three numbers (x,y,z) and calculate the sum, subtraction, multiplication, and division of the numbers (x/y)/z using functions. There is also a function to print the results.

Member Avatar for rproffitt
0
24
Member Avatar for MIRZA SAJID_1

Develop a C++ function that accepts int array & char array and the array’s size as arguments. Read file, which contains the mix of name and number. Make sure to regrow your array.

Member Avatar for rproffitt
0
63
Member Avatar for Afrah

Write the main such that it reads two integers: Start and End and calls the void function of part ‘a’ in order to print the average of integers divisible by 3 in the range: [Start..End].

Member Avatar for rproffitt
0
47
Member Avatar for aq9875942

Write a C++ program to get ages of ten (10) students from user and then display on console using array. Also, there should be restriction like age should only be in the form of integers and name should be in proper format. E.g., Name should not be 123 or abc.

Member Avatar for rproffitt
0
33
Member Avatar for Puvaan

#include <cstdio> #include <iostream> #include <string> using namespace std; using std::string; // function to get maximum string of characters size_t getMaximum(string dum[], int n){ size_t max = dum[0].size(); for (int i = 1; i < n; i++){ if (dum[i].size()>max) max = dum[i].size(); } return max; } void countSort(string a[], int …

Member Avatar for Schol-R-LEA
0
79
Member Avatar for yahon23837

im trying to create and algorithm in python but i created it in C++ instead as i don't know python well enough i know it's easy and i can learn it in one day or two it's just the syntax but i don't have the time to learn python right …

Member Avatar for Jawass
0
221
Member Avatar for banmohammed

Write the C++ code to reverse the sequence of characters in the second half of it. Ex: S1="abcdef" Output="abcfed"

Member Avatar for Schol-R-LEA
0
35
Member Avatar for Anshumaan

Biology versus Chemistry Each subject has their own terms and each term has a weightage representing its importance. Terms and their weightage are given in two files namely biology.txt and chemistry.txt. A passage will have mixed terms from both the subjects. Given a passage in an input file, determine whether …

Member Avatar for Schol-R-LEA
-1
122
Member Avatar for MD_546
Member Avatar for Shikigami

1. Use two-dimensional array with size 7 columns and 5 rows. 2. Seat numbers are populated during run-time. 3. User is asked to input a seat number. 4. Seat number chosen is replaced by 0. 5. Program displays a remark “Seat successfully reserved” when reservation is done. 6. User is …

Member Avatar for Schol-R-LEA
1
131
Member Avatar for Desamaladeepak
Member Avatar for ama_ni

hello, i need someone to tell me how do i read string in assembly 8086 (nasm) and it would be better to write down the code ~~ thank you

Member Avatar for Leslie_2
0
416
Member Avatar for Athar_3

Create a Client/Server using DatagramSocket and DatagramPacket Programming and using DiffieHellman (1024) as encryption algorithm.

Member Avatar for rproffitt
0
44
Member Avatar for Haswanth

Simulate an ATM machine. Program should able to do the following operations: A. Create accounts for the users. A user account is created using User ID and Password. Every user has unique User ID and Password. B. A user should able to login using his User ID and Password. C. …

Member Avatar for rproffitt
0
106
Member Avatar for mike_102

Please don't tell me to use an `std::string` I'm intentionally not using them. I have my own string struct, and operate on `char*` for some parts of it. I'll probably eventually push a lot of this into my string struct, which eventually will store everything in my memory manager. i …

Member Avatar for rproffitt
0
25
Member Avatar for Haswanth

Write a template function that returns the maximum value of three elements passed to the function. Parameters passed to the function can be of int, double, char but all parameters passed are of the same type at point of time. Parameters to be passed to the function as are read …

Member Avatar for rproffitt
0
36
Member Avatar for saadbangashh

I am beginner and still learning c++. So this was a question in my assignment to make a horizontal bar chart something like this, Example: Input: N1=>8 , N2=>6 , N3=>2 , N4=>10 , N5=>9 10 * 09 * * 08 * * * 07 * * * 06 * …

Member Avatar for dbfud1988
0
1K
Member Avatar for Noor_26

#include<conio.h> #include<cstdlib> #include<windows.h> using namespace std; oustrup"<<endl; cout<<"b) Dennis Ritchie"<<endl; cout<<"c) Ken Thompson"<<endl; cout<<"d) Brian Kernighan"<<endl; choice=getch(); if(choice=='A'||choice=='a'){ cout<<choice<<" is correct Answer"<<endl<<endl; st.marks++; } else{ cout<<choice<<" is incorrect Answer"<<endl; cout<<"The corrent answer is a"<<endl<<endl; } break; case 4: cout<<i+1<<") A language which has the capability to generate new data types …

Member Avatar for rproffitt
0
103
Member Avatar for Artiuh

#include <iostream> #include <fstream> #include <string> #include <conio.h> #include <iomanip> #include <stdio.h> #include <stdlib.h> #include <unistd.h> using namespace std; // Subprogram pentru Admin void Login(string& admin ,string& password) { string Users[200]; string Pass[200]; bool valid = false; void AdminOptions(); int x = 0; ifstream UsFile; UsFile.open("admin.txt"); UsFile >> Users [x] …

Member Avatar for rproffitt
0
69
Member Avatar for Suraj_43
Member Avatar for Alialnosiari
Member Avatar for mike_101
Member Avatar for Mark_118

Hi, I have a coding project due in 12 hours and I'm having a really hard time with programming. I came across this website because of my desperation for help. These are the requirements to pass the project: Create a basic Restaurant Point of Sale software using C-Language. Your restaurant …

Member Avatar for rproffitt
0
272
Member Avatar for lilindiekid

Hi, I've been suffering with my magic the gathering c++ code. Here's the problem; I make combat between two cards and after the fight, opponent's HP will be reduce. So far, the HP reduces in side the classes but when we call the player's HP, it doesn't change as in …

Member Avatar for rproffitt
0
47
Member Avatar for Arosha_1
Member Avatar for MANYO
Member Avatar for ssharp77

In need of some help with a programming project which reads text from one file and places it in a 2nd file, which will be identical to the first file with the exception of any string of two or more consecutive blanks being replaced by a single space/blank, eliminating extra …

Member Avatar for Dhushanthan
0
941
Member Avatar for Hope_9

(a) Create a class named LivestockProject with fields that hold a membership number, the name of the member, surname, date of birth, gender, location and initial number of livestock (cattle) turned in. Include a constructor that initializes each field to appropriate default values. Also include methods to set and get …

Member Avatar for rproffitt
0
147

The End.