49,761 Topics

Member Avatar for
Member Avatar for mr.unknown

i want an output and i have tried but can't get this... #include <cstdlib> #include <iostream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) { int r,c,s; for(s=15,r=6;r>=1;r--,s++) { cout<<setw(s); for(c=1;c<=r;c++) cout<<"X"<<endl; } system("PAUSE"); return EXIT_SUCCESS; } OUTPUT: X X X X X X X X X X …

Member Avatar for rubberman
0
413
Member Avatar for Eyobed Paul

develop a c++ program for length conversions. The program should have a menu so that the user can select the type of length conversion by typing a value between 1 and 8 as follows: 1.centimeter to other units 2.Meter to other units 3.Kilo meter to other units 4.feet to other …

Member Avatar for rubberman
-1
127
Member Avatar for simbarashe.tandi

I need to knw hw I can make a gui for aa prograaaam written in C++ ,m using the codeblocks IDE

Member Avatar for rubberman
0
96
Member Avatar for soche123

I'm asked to write a program that takes as input a char value and returns true if the character is uppercase; otherwise, it returns false.. so far I've made the definition of the function but I don't know how to get it's output on the screen through int main..could you …

Member Avatar for phorce
0
143
Member Avatar for soche123

I was solving this problem and I'm struck in some problem..could you guys help me out?thanks Problem: Write the definition of a function that takes as input three numbers and returns the sum of the first two numbers multiplied by the third number. solution: #include <iostream> #include <conio.h> #include <math.h> …

Member Avatar for mike_2000_17
0
154
Member Avatar for sanyam.mishra

I am doveloping a game brain champ. This is its version 3. In this version I want to use mouse in addition with keyboard for input. I have successfully tested its standalone keyboard version as well as mouse version. I have used int86() function for mouse with 0x33 interrupt number. …

Member Avatar for sanyam.mishra
0
683
Member Avatar for rash_13

I am reading from a file which has words like: connecting classes feeds I need to convert each character to lowercase and then call a function to remove suffix from each word. Say, first on connecting, then on classes... I am done with rest of the part but have a …

Member Avatar for Lucaci Andrew
0
317
Member Avatar for cobaltfive

I have been working on this for two weeks now and it has been progressing slowly. I am currently working on getting the the remove function of my program to 1. first check to see if there is a product 2. list the products 3. allow the user to select …

Member Avatar for triumphost
0
234
Member Avatar for sanyam.mishra

I had recently started using Dev C++ 5.4 (earlier I was using Turbo C++ 3.0). Suggest me some good books to start programming in windows. And also my old programs which I had made in Turbo C++ are not compiling successfully. Fstream.h, iomanip.h and graphics.h are not not working in …

Member Avatar for mike_2000_17
0
128
Member Avatar for mozammel

Hi, i got a program that crashing while i want to delete a pointer value. here is the code: #include<iostream> using namespace std; class sab{ int a; public: sab(int x); ~sab(); int get(); sab(const sab &ob); }; sab::sab(int x) { cout<<"constructor"<<endl; a=x; } sab::sab(const sab &ob){ cout<<"copyconstructor"<<endl; } sab::~sab(){ cout<<"destructor"<<endl; …

Member Avatar for rubberman
0
210
Member Avatar for arham.malik.900

This is a card game which may have two or more players. Each of the players is given 4 face down cards at a time. The player can reveal his/her cards once he/she gets them. Other 4 cards are kept face up in the center for all the players to …

Member Avatar for iamthwee
0
201
Member Avatar for DavidB

Here is my first Code Snippet contribution: a C++ sub-routine that computes the roots of a quadratic equation. Notes: * This sub-routine checks if a = 0. * IF a = 0, then the equation is actually not a quadratic equation; it is a linear equation with one--if any--root. * …

Member Avatar for DavidB
1
726
Member Avatar for RJ Adeel
Member Avatar for 9tontruck

I am trying to find an area center of various types of rectagles. (Center of gravity and midpoint of 4 ertices never work so please think in different way) Please see this image: http://img22.imageshack.us/img22/7881/rectangles.jpg I have to position of red dot ` Point vertices[4]; Point areaCenter; ` I have to …

Member Avatar for Moschops
0
397
Member Avatar for christinetom

Just wondering if anyone has used FLTK gui toolkit before? If so what did you think? I'm unsure whether to use that or wxWidgets. Thanks

Member Avatar for christinetom
0
249
Member Avatar for dirtydit27

Hello, I'm having a little trouble with a some code that I'm writing for homework. Basically, I'm taking two files that contain numbers and merging the contents into another file. The files do not have the same amount of numbers in them (one might contain 7 while the other contains …

Member Avatar for aakash121
0
413
Member Avatar for chikaibeneneme

cant seem to figure out what the error is :( #include<iostream> using namespace std; //prototyping variables void averageCal(double a[]); void productCal (double p[]); void sumCal (double s[]); int main () { double userinputs [5];//storing the user inputs in a array for(int i=0; i<5; i++)//suing a for loop to cycly and …

Member Avatar for Lucaci Andrew
0
226
Member Avatar for mdfaisalamin

Hi, I am trying to read a CAN Stick with a USB interface and I am connected to a sensor module. I have a program which transfer sensor data from the embedded controller to the CAN Stick. There is a program which use an internal queue to transfer data from …

Member Avatar for mdfaisalamin
0
423
Member Avatar for nathan.pavlovsky

Hello programmers! I am creating a player vs. computer connect four game. It has full interactivity along with error checking for invalid inputs by the player. However, when the main() function is run, the program "stops"/or freezes up after there are five pieces in the connect four board. The game …

Member Avatar for nathan.pavlovsky
0
172
Member Avatar for SpottyBlue

I was given a question from my college's e-learning blackboard: > Write a program that will act as a simple calculator. It should ask the user for a floating point number, an operator, and another floating point number. The program should first check the operator is either ‘+’, ‘-‘, or …

Member Avatar for sepp2k
0
261
Member Avatar for arthur5

hoe do i write a c++ program that takes an integer as input and displays the number as either prime number or not.

Member Avatar for baburajan
-1
113
Member Avatar for Fatma30

Angles are often measured in degrees, minutes, and seconds. There are 360 degrees in a circle, 60 minutes in one degree, and 60 seconds in one minute. Write a program that reads two angular measurements given in degrees, minutes, and seconds, and then calculates and prints their sum. Constants are …

Member Avatar for KaeLL
0
130
Member Avatar for admin-pc
Member Avatar for salahelsafiiom

hi i need to creat code in c++ to make TCP header and crc in one program in c++ thanx

Member Avatar for rubberman
-1
91
Member Avatar for arslan.maqsood1

Question#1Senior salesperson is paid RS.400 a wek, and a junior salesperson is pair RS.275 a week.Write a program that accepts as input a salesperson's status in the character vaiable status is's' or "S" the seniors person's salery should be displayed;if status is 'j' and 'J',the junior person's salery should be …

Member Avatar for rubberman
0
142
Member Avatar for MasterHacker110

I got into graphics programming a few days ago. I did some graphics before but very little in Ittlicht (a complete game engine with sound, rendering, network etc...) But I heard about DirectX and how great it is for games and other 2D and 3D graphics. But the API is …

Member Avatar for MasterHacker110
0
142
Member Avatar for furalise

Hi all. I've read allot about streams but I'm wondering if anyone can tell me why cin >> stringstream doesn't work? I'm getting there but my understanding has some floors in it. eg. stringstream Mystr; cin >> Mystr; Thanks so much.

Member Avatar for furalise
0
4K
Member Avatar for nathan.pavlovsky

Hello, as a project I am working on a player vs. computer game of Connect Four- where the computer has a lot of attitude. My code is below; the comments explain everything. ` // A Player vs. Computer Connect 4 game` #include <iostream> #include <vector> #include <string> #include <cstdlib> #include …

Member Avatar for nathan.pavlovsky
0
1K
Member Avatar for soche123

output should look like this * *** ***** ******* ********* ******* ***** *** * and seond one *************** *************** *************** *************** *************** Thank you guys in advance!

Member Avatar for sanjulovers
0
180
Member Avatar for HUSSEINI

phase(1) create a textual menu of the items in their prices phase(2) acivate your menu so that a user can select one item from the menu and display the selected item on the screen. phase(3) improve upon your program to allow user to order more than one item and the …

Member Avatar for sanjulovers
0
725

The End.