49,766 Topics
![]() | |
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 … | |
Can someone help solve this as C++ program for me? Write a program to process weekly employee time cards for all employees of an organization. Each employee will have three data items: an identification number, the hourly wage rate, and the number of hours worked during a given week. Each … | |
![]() | how to Delete the whole list using myList.deleteAll( ) and Implement Linked Stack for Character data type to show name in reverse In the following code? |
Would anyone be able to help me, I am trying to make a C++ program which reads values from csv file and prints them(there are going to be three 4 rows, 3 columns). I want to know how can I add the rows (like the sum of the first row … | |
![]() | Q1. Given the partial implemenatation of Linked List, you are required to add the following functionality in the code Delete the whole list e.g. myList.deleteAll( ); Implement Linked Stack for Character data type and show how it reverses your Name. Q2. Show in diagramatic representation (draw by hand, take picture … |
Hello, I'm new to C++. How do I find the sum of integers from a through b, no input from user needed, and only using while loop statement. The results from my question on the internet gave me only the solution using for loop statement. Can anyone show me how … | |
Anyone can help me on my GUI. I'm making a BMI calcu GUI. But I don't know hot to input to my check bmi button. Im a total beginner btw. What code I need to add in a button to perform bmi calculation? | |
Create a program that would convert a decimal number to either binary, octal or hexadecimal counterpart. Your program should ask the user for decimal with a data type of a long integer (4 bytes or 32bits in length or having a range of +2147483647 to -2147483648, or 4294967296 if unsigned). … | |
Hi everyone, Today i have a question about how can i write one code for all shapes like, ****** ***** **** *** ** * or other shapes like square or tringle. I want to know the difference in every code. Thanks alot. | |
Posting this to test the software which has the access of Open API | |
Hi i am computer science students. I always confused to about php base websites or another website. Yesterday my teacher gave me assingement to check website either it is php base or other platform. But i haven't decided to give answer. I am week student in class. please help me … | |
What are the top learning management systems for corporations? And how it helps for employee training? | |
I want to develop a c++ code to store details of visitors in file. | |
write down a program which generates numbers from 1 to 10 but in following format in C++ 1 2 3 4 5 6 7 8 9 10 | |
This is what I have so far the teacher wants us to request the file name and I have no clue where to even start. Thank you for the help! #include <iostream> #include <string> #include <fstream> #include <cmath> #include <iomanip> using namespace std; int main() ifstream inFile; ofstream outFile; string … | |
This is my Code C++ for my assignment. Please help me to convert it to C code. Thank you! #include<iostream> using namespace std; #define N 10 int main() { int array[N],p,q; for(int i=0;i<N;i++) array[i]=i; cout<<"For instance, given elements are "; for(int i=0;i<N;i++) cout<<array[i]; cout<<endl; int r=0; while(cin>>p) { cin>>q; if(p>=0 … | |
![]() | Hello everyone! I'm working on this C++ program but im kind of lost. I'm using calling fuctions with void and parameters to create this program that is supposed to average a set of 5 scores and dropped the lowest one. It should calculate and display the average of the four … |
I try to modified this Pac-Man Coding to spawn one more enemy which is the 'E' when the timer below 10sec but i failed to do it.Can you guys help me? I attached the coding in link below. https://drive.google.com/file/d/1f36X9s9RXL35VfNVJnx8mvWvEgcdKy3o/view?usp=sharing | |
Hi All, I would personally looking for someone from the US for a partnership. This will be something like a part-time job that needs 5 hrs per week. Requirements: US citizenship for legal issues. Basic understanding of technical - Junior Full-stack (web and mobile development) Experience working remotely. Open-minded and … | |
can someone help me write this short programme I am newby... Create a class Student that will have private attributes string name, string last name, string date_birth, double average_ grade. This class must have a constructor without parameters (in which all string attributes are set to an empty string, and … |
The End.