49,757 Topics
| |
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 … | |
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 … | |
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, … | |
// 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 … | |
I have a code of c++ and i want to convert it into python i shall be thankful to you. | |
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 … | |
| 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 … |
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 … | |
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 … | |
Draw a palm shape fireworks in c++ using the concepts of arrays,functions,pointers only. | |
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 … | |
| |
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 … | |
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 … | |
#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 ; } … | |
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 | |
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 … | |
Count number of occurrences of a digit with while/do while without using array in c++ | |
#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 … | |
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 * … | |
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, … | |
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 … | |
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; } | |
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 … | |
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]; } … | |
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. | |
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 … |
The End.