49,757 Topics

Member Avatar for
Member Avatar for Ragnar14

Q: C++ You are required to design an application for the owner of ice-cream stand asks that you write a program to help her track sales results. She has ten ice-cream stands around the city, each selling a variety of ice-cream treats. He wants to enter the sales value from …

Member Avatar for Dani
0
83
Member Avatar for Mahnoor_1

Question is: Create a class Employee with following constraints in mind: 1. Declare three private data members named id,name,NIC of int,string,long respectively. 2. Overload stream insertion and stream extraction operators. Implement a global function named saveData, that'll allow the user to enter any number of employee's data and store it …

Member Avatar for Muhammad_251
0
4K
Member Avatar for Dontah

So, basically this code is for a Tic Tac Toe game, I'm trying to make a Singleplayer mode where Player 1 inserts a spot number to put his X, and Player 2 uses a random number generating function and assigns his O in a random spot. Everything works fine except, …

Member Avatar for grantyp2
0
153
Member Avatar for jkamugisha

// c program to add 10 elements entered by the user #include <stdio.h> int main () { int i; float elements[10]; //declaring the array float sum = 0; for (i = 0; i < 10; ++i) { printf ("Enter element %d: ", i + 1); //getting the elements from the …

Member Avatar for rproffitt
0
389
Member Avatar for Arslan_7
Member Avatar for rproffitt
0
50
Member Avatar for Nur Izzati

public static void main(String[] args) Scanner.sc=new Scanner(System.in); String name = new String(new char[30]); final String pizza1 = "Chicken Fazita"; final String pizza2 = "Chicken Bar BQ"; final String pizza3 = "Peri Peri"; final String pizza4 = "Creamy Max"; final String roll1 = "Chicken Chatni Roll"; final String roll2 = "Chicken …

Member Avatar for rproffitt
0
220
Member Avatar for Bassel_1

Hi guys. I want your help to convert this program from c++ to c language The question is :-A manufacturer wishes to determine the cost of producing an open-top cylindrical container. The surface area (of the container is the sum of the area of the circular base plus the area …

Member Avatar for rproffitt
0
265
Member Avatar for vegaseat

What "Hello World" is to the console, the "Bouncing Ball" is to the Graphical User Interface. Nothing fancy, the ball is created via a call to the API function ellipse() and then bounced within the confines of the windows form. For the DEV C++ crowd: Let me know if you …

Member Avatar for laheg
2
25K
Member Avatar for pragya.gupta15

How can I write the code such that - 1. I am reading the file which may contain numbers such as 23 34 45 56. 2. After reading the contents of the file, the contents of the file get stored to struct array such as struct abc in the above …

0
59
Member Avatar for Saniya_1
Member Avatar for revolutionary

Draw a palm shape fireworks in c++ using the concepts of arrays,functions,pointers only.

0
39
Member Avatar for nelvinsavio2

while isSearching do ?2????????? ← ????????????????(?2) ∇???? ← ?2????????? − ?1????????? ?1 ← ?2 if ∇???? > 0 then ??? ← 0 ?2 ← Run(?1) ???? ← ?2 else ?2 ← ??????(?1) ??? ← ??? + 1 ?2 ← ?????????(?2, ????) if ????????????(?2) then ??v???(?2) else ?2 ← ??????(?1) if …

Member Avatar for Dani
0
49
Member Avatar for 21savage
Member Avatar for Big papi

QUESTION:You are required to write a program that performs syntax checking for a given computer program Hey Everyone i need your help badly can anyone please modify my code below against the following rules: • The code always starts with begin keyword and ends with the end keyword • The …

0
293
Member Avatar for BirdaoGwra

Hi, Sorry, If this question is not appropriate to this section. Admin, kindly move this qeustion. I recently changed my tdm-gcc-5.1.0-3 to tdm-gcc-9.2.0, 32 bit. Before changing the gcc my software was working fine, compiled without any problem. But today I installed gcc 9.2.0 and I can't compile my sofware …

0
41
Member Avatar for MD Nawab
Member Avatar for VIJAYA_5
Member Avatar for P4Programs
1
70
Member Avatar for syamim_1

#include <iostream> using namespace std; int main () int charge, aftercharge, parking_hours; cout << "please put your parking hours: " ; cin >> parking_hours; if (parking_hours>=1) { charge = 1 ; } else if (parking_hours>=11) { charge = 2.50 ; } else if (parking_hours>=12) { charge = 6.00 ; } …

Member Avatar for Dani
0
154
Member Avatar for Saurabh_8

Write a C++ data structure program to implement following operations on Single Dimension Array. (Note: Use Class Use Switch case While printing, Print all the elements in single line with space) 1. Bubble Sort 2. Insertion Sort

Member Avatar for Dani
0
53
Member Avatar for kanugula

Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Petya has a number consisting of n digits without leading zeroes. He represented …

Member Avatar for kasraneni2003
0
318
Member Avatar for Xoxo_2

Count number of occurrences of a digit with while/do while without using array in c++

Member Avatar for rproffitt
0
78
Member Avatar for kanugula

#include<stdio.h> #define SIZE 10 struct stack{ int a[SIZE]; int top; }; struct stack s; s .top=-1; void push(int value); void pop(); void display(); void peakelement(); int main() { int choice,value; while(1) { printf("\n1.push 2. pop 3.display 4. peakelement 5. exit"); printf("enter your choice"); scanf("%d",&choice); if(choice==1) { printf("enter value to be …

Member Avatar for rproffitt
0
79
Member Avatar for newtocplus432

Hello and thanks for reading my post. I need help converting the fallowing Algorithm into working C++ code, and below is what i have come up with so far, what do i need to do to make this compile? Algorithm: PayCalc 1. CaseOf PayCode = "H" Pay = Rate * …

Member Avatar for mohannad_1
0
1K
Member Avatar for Debasis_1

I am an intermediate in VC++ and trying to accomplish the following:- 1. Dock a timer created using Windows forms to the extreme right of the taskbar (and to the left of the notification area or system tray). 2. Make it responsive (match its height with that of the taskbar, …

Member Avatar for rproffitt
0
54
Member Avatar for Violet_82

Hi there, I am trying to do an exercise from a C++ book. It goes: Develop a program that will move the knight around an empty chessboard. The chessboard is represented by an 8-by-8 two-dimensional array [ICODE]board[][][/ICODE]. Each of the squares is initialized to 0. We describe each of the …

Member Avatar for yaer
0
3K
Member Avatar for atler

int cols, rows; int thehead=9; for( cols = 1; cols <= thehead; cols++) { for(rows = 1; rows <= thehead; rows++) { if(((cols+rows)==5) || ((rows-cols)==5)) { cout << " "; } else { cout <<"*"; } } cout<<endl; }

0
87
Member Avatar for Tafadzwa_2

JQ is taking a car trip with his family. On the trip, he will stop for fuel, food or lodging. When stopping for gas, JQ will record the amount of fuel he is willing to pay for. When the family stops for lodging, they will also have a meal. JQ …

Member Avatar for rproffitt
0
78
Member Avatar for jozz3

I have to convert a piece of C++ code to Python. Except I can't understand what it's doing. This is the code: [CODE]#include <iostream> using namespace std; int calculate(int values[], int size) { int answer = 0; for (int 1 =0; i< size; i +=1) } answer += values[1]; } …

Member Avatar for Smartfitness33
0
8K
Member Avatar for Jericho_2

Can someone help me with this? Write a c++ program simulator that will compute for the average waiting time of each customer in a bank. Also the program will indicate the number of the teller who accommodates the customer.

Member Avatar for Dani
0
132
Member Avatar for Muhammet

This is my derivative function. This code works correctly but does not delete the constant term. It sets directly to 0 and writes to the result. how can i fix this? Thank you.. EX: Input: "-x^3-6x^2+ 4x+22" Output: “-3.0x^2 -12x +4.0 + 0.0” How can i delete this 0.0? struct …

Member Avatar for rproffitt
0
564

The End.