49,755 Topics

Member Avatar for
Member Avatar for TomTom2525

A University wants to make a basic graphical display to show how many people received different grades for a piece of work on a module (histogram). You are required to write a program in C++ that achieves this. The program consists of the following three tasks: Task1 The program should …

Member Avatar for rproffitt
0
58
Member Avatar for Vinc_1

#include <iostream> // input and output code #include<conio.h> // getch - passwd #include<cstdio> // fileopen fscanf fileclose #include<windows.h> // system cls and pause using namespace std; ///////////////////////////////////////////////////CLASS EMPLOYEE ///////////////////////////////////////////////////////// class admin{ private:// variables for admin details char name[30],id[5],position[20]; int age,Salary,experience; //quit functions void quit(void){ cout<<"\n\n\n Please ENTER To Go Back …

Member Avatar for rproffitt
0
45
Member Avatar for Thedoce

How to add score counter to rock paper scissors game? I can't get score counter work. (Player wins, Computerwins) I got it working without functions but now when I added them I don't just get it how to do it... #include <iostream> #include <math.h> #include <string> int numGen (); int …

Member Avatar for chuckgr
0
2K
Member Avatar for Mahinder_1

**i really need your help guys for data structure and algorithm task my assignment is menu-driven program for array operations in c++ Traversal, Insertion, Deletion, Searching, Sorting i have to perform this in menu to show how they work can you please provide mee code for this**

Member Avatar for rproffitt
0
363
Member Avatar for Mahinder_1
Member Avatar for Quinton_1
Member Avatar for Colton

#include "iostream" #include "iomanip" #include "cmath" #include "string" using namespace std; int main() int temp[7][2]= {0}; int day = 0; for(int i = 0; i < 7; i++) { cout<<endl<<" Day: "; cin >> day; for(int i = 0; i < 7; i++) { cout << "\nEnter low temperature: "; …

Member Avatar for Reverend Jim
0
28
Member Avatar for Dmiller071

Hi all, I've started to dive into OpenGL w/C++ to expand my library knowledge but I had a few questions. I've been following a tutorial online that basically walks step by step through the compiler linking, functions, and basics of an OpenGL program. I really would love to create some …

Member Avatar for oussama_5
0
224
Member Avatar for melll

task 123454321 123454321 123454321 123454321 123454321 #include<iostream> using namespace std; int main(){ int i,j; for (i=1; i<=5; i++) cout<<i; for(j=4; j>=1; j--) cout<<j; } But what the next ???

Member Avatar for dbfud1988
0
62
Member Avatar for MohdAleeRehman

1. Write a program that would print the information (name, year of joining, salary, address) of employees by creating a class named 'Employee'. 2. Create a function in the Employee class that finds an employee by the given year of joining. 3. Create a function for sorting the employees according …

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

Write a C or C++ program that outputs prime numbers. This program should work as follows: The user will run the program and will enter a number on the command line. The program will then create another process using fork() that outputs all the prime numbers less than or equal …

Member Avatar for Reverend Jim
0
208
Member Avatar for Mohammed_98

The arithmetic mean of two numbers is the result of dividing their sum by 2. The geometric mean of two numbers is the square root of their product. The harmonic mean of two numbers is the arithmetic mean of their reciprocals. Write a C++ program that asks the user for …

Member Avatar for toneewa
0
203
Member Avatar for cambalinho

i have code for write on console and change the text color and backcolor and clear screen(and much more) inside of a nice class console. these function change the text color and back color: void SetColorAndBackground(int ForgC, int BackC=0) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ForgC|(BackC<<4) ); } but is there any way for …

Member Avatar for Mendoza,
1
4K
Member Avatar for omar90

how to write a function of image rotation by using the following f is the input image, (x0,y0) is the rotating center & a is the rotating angle. Return value is the output image (using IM & Bilinear interpolation);

Member Avatar for rproffitt
0
76
Member Avatar for omar90

how to rotate image using c-- following this byte[,] rotation(byte[,]f, float x0,float y0,float a); f is the input image, (x0,y0) is the rotating center & a is the rotating angle. Return value is the output image (using IM & Bilinear interpolation);

Member Avatar for rproffitt
0
97
Member Avatar for Essam_6

print("Enter number of columns:",end=" ") cols=int(input()) print(cols) print("Enter number of rows:",end=" ") rows=int(input()) print(rows) print("") side="right"0 print("[5][5] is cleaned") for i in range(rows): if side=="left": for j in range(1,cols): print("Move forward") print("[{i}][{j}] is cleaned".format(i=i,j=j)) else: for j in range(cols-2,-1,-1): print("Move forward") print("[{i}][{j}] is cleaned".format(i=i,j=j)) if(i!=rows-1): if side=="left": print("Turn right") print("[{i}][{j}] …

Member Avatar for rproffitt
0
45
Member Avatar for Ashton21

![Screenshot_2021-10-02_134648.png](https://static.daniweb.com/attachments/4/fa8e4c345dd089410fa7414ea44ac516.png)

Member Avatar for rproffitt
-1
59
Member Avatar for logicslab

Hi pals, I am a Newbie in C++ Programming field. I plan to add graphics.h header class in Dev -C++ Version 4.9.9.2 from Bloodshed which is come along with Borland Compiler. I follow the Steps in URL : [url]http://www.uniqueness-template.com/devcpp/#step2[/url] But I Got Error in the Sample code which test the …

Member Avatar for James_163
2
27K
Member Avatar for Ashton21

#include <iostream> #include <cstdlib> #include <time.h> using namespace std; int main() { srand(static_cast<int>(time(0))); int secret = rand() % 10 + 1; int guess; cout << "Guess a number between 1 and 10." << endl; cin >> guess while (guess != secret) { if (guess < secret) { cout << "Too …

Member Avatar for rproffitt
0
39
Member Avatar for Bonga_1

Hello everyone I am a c++ beginner programmer, currently doing finalising classes. I wish to be assisted in fixing my code. I want to pass an array of objects as an argument and then use that object to search for data in the program but it seems like the objects …

Member Avatar for rproffitt
0
31
Member Avatar for Jinhwan

#include <iostream> using namespace std; int main() { int a, b; char c, d; cin >> a >> b >> c >> d; for (int row = 1; row <= a; row++ ){ cout << c; for (int cols = 1; cols <= b; cols++){ cout << d; } } …

Member Avatar for rproffitt
0
75
Member Avatar for V3N0M

Good afternoon guys, I am reaching out for help on C++. I just started the semester taking the Computer programming 1 at my college which is taught in C++. I am working on a chapter project qusetion and I feel lost on how to achieve the solution using the basic …

Member Avatar for rproffitt
0
172
Member Avatar for Chinmay_4

#include<iostream> #include<conio.h> using namespace std; struct marks{ int phy[10]; int math[10]; int chem[10]; }; int main(){ struct marks m[20]; int i,n; cout<<"Enter the number of students : " << endl; cin >>n; for(i=0;i<n;i++){ cout<<"\nEnter Physics marks: " << endl; cin >> m[i].phy; [error here] cout<<"\nEnter Maths marks : "<< endl; …

Member Avatar for Schol-R-LEA
2
91
Member Avatar for MagnusTheRed90

I need an end user license agreement for code shared amongst my home projects with other developers. The EULA needs to include a "pay to the order of x" clause, and also needs to include the ability for me to utilze the code at multiple companies that I could participate …

Member Avatar for Dani
1
52
Member Avatar for Shubham_29

Create a class date with day, month and year as its members, Accept the date from the user and display it. Overload the increment and decrement operators for displaying the next and previous date for the given date

Member Avatar for rproffitt
0
35
Member Avatar for Firestone

How can I change my program's icon for anyone who uses the program? Obviously I would have to include the .ico file with it, but beyond that, I'm stumped.

Member Avatar for Amina_6
0
879
Member Avatar for LeafBulba

I am just learning C++. I haven't made any games with SFML or anything like that. Just wondering whether SFML would be easy for a newbie like me. I am planning on using it after I finish learncpp.com. I am currently at the header guards section right now. Also, what …

Member Avatar for rproffitt
1
30
Member Avatar for LeNewbiee

We are tasked to simulate a simple printing queue, where users take turn at printing their files/documents. We just need to put each of user's name, ID, and number of pages and then output the queue in the program. We need to do it by using Queue with Array. So …

Member Avatar for rproffitt
0
51
Member Avatar for emmamark

(Jumble word program) (plz guys help me to make this program) user enter few characters randomly, then press enter, (your program stores 50 names of your class fellows) if by rearranging your entered characters it matches to the names stored, then it will show it, otherwise it will show that …

Member Avatar for rproffitt
0
29
Member Avatar for Priya_37

Write a program for the below mentioned question. Create three variables : a,b & c In the code, assign them some random integer values. Print the three numbers in ascending order, separated by commas. For example: Let a =1, b= 5, c= 2. Output = 1,2,5

Member Avatar for Schol-R-LEA
0
54

The End.