51,593 Topics

Member Avatar for
Member Avatar for ImmutableIcarus

Thank you in advance for anyone who is willing to help me. Can someone give me the answers and briefly explain what you did? I have been stuck and frustrated with these questions for about a week now, so I'm asking for help. There are two questions that I need …

Member Avatar for Reverend Jim
0
430
Member Avatar for kimmy2467

new to programming. everytime i try ti comppile this program i get an error message saying expected unqualified... here is the code and the question that the code was made from Write a program that uses a loop to print the numbers from 10 to 20. int main(); int crt …

Member Avatar for nullptr
0
222
Member Avatar for kimmy2467

im new to programming. every time I try to compile my programs I get the message saying "expected unqualified id before '{' token. heres an example: int main() #include <stdio.h> int a, b; printf("Enter the first value:"); scanf("%d", &a); printf("Enter the second value:"); scanf("%d", &b); a = b + (a++) …

Member Avatar for rproffitt
0
207
Member Avatar for Nick_31

Hello, I am stuck on how to exactly do this problem if anyone could offer me any help with either a worked out solution or just some pseudocode that would be great. Here are the rules and information about the assignment below. Assignment: What is The Game of life? Not …

Member Avatar for JamesCherrill
0
467
Member Avatar for ImmutableIcarus

Write a Program that asks the user to input a positive integer. If the user inputs a negative number, program should output "ERROR" and ask for /the user's input again. If the user inputs the value of 0, the program says "NO AVERAGE". If the user inputs a -1, the …

Member Avatar for Reverend Jim
0
360
Member Avatar for Nick_31

Hello, I am stuck on where to go with this assignment for checking if the sliding puzzle is solved right or wrong. I will include the context of the assignment so you can see what needs to be included. If you could just share some code or pseudocode to get …

Member Avatar for rproffitt
0
440
Member Avatar for jimmichaels29

analyze the problem. walkthrough the code. I would like to charge for this solution $10 to Renewal Computer Services, if I may post here (kids & teens free). when -50 is reached, doesn't blow past the maxvalue+1U and cause a cpu-hogging forever loop, it doesn't actually reach -50 equivalent (UINTMAX-49). …

0
188
Member Avatar for Meno_1

#include<stdio.h> #include <iostream> #include<stdlib.h> using namespace std; int main() string custname,carmodel,carnum; int days=0,rentalfee=0; cout << "Sila isi nama anda : "; cin >> custname; cout<<endl; do{ cout<< "Sila berikan pilihan model kereta pilihan anda !"<<endl; cout<<"Tekan A untuk model Axia."<<endl; cout<<"Tekan B untuk model Saga."<<endl; cout<<"Tekan C untuk model Exora."<<endl; …

Member Avatar for ravss
0
268
Member Avatar for Rohan_12

HI everyone, _SBLOCK *allocateMemBlock(size_t size) [ _SBLOCK *block = (_SBLOCK*)sbrk(0); void *memadr = (void*)sbrk(0); void *allocate_mem = (void*)sbrk(BLOCK_SIZE + size); if(allocate_mem == (void*)-1) [ return NULL; ] else [ block->next = NULL; block->isfree = false; block->size = size; block->memoryAddress = memadr+BLOCK_SIZE; return block; ]

Member Avatar for ravss
0
2K
Member Avatar for engr_3

Hy I have my data in file as Energy,utili,surplus,shortage 1,2,3,4 5,6,7,8 9,10,11,12 And I want to read this data column wise and then I want to write it to another file so that I may be able to perform some operations on it Please help

Member Avatar for DGPickett
0
318
Member Avatar for Mark_48

Hello, I am looking some help with a program. I am trying to parse the following file into a dynamic Array "Database[8][5]". Device ,Gain (beta),Power Pd(W) ,Current Ic(A) ,BVceo(V) 2N3904 ,150,0.35,0.2,40 2N2202 ,120,0.5,0.3,35 2N3055 ,60,120,10,90 2N1013 ,95,50,4,110 MPE106 ,140,15,1.5,35 MC1301 ,80,10,0.9,200 ECG1201 ,130,1.3,1.1,55 I seem to beable to parse the …

Member Avatar for rproffitt
0
383
Member Avatar for Elhussein

1) Write a program to take as input three integers for (a) incrementing, (b) skipping and (c) ending. Your program should start counting from zero, incrementing by a, skip b and end at c. Example 1: input: 2, 6, 12 output: 0, 2, 4, 8, 10, 12 2) Write a …

Member Avatar for rproffitt
0
278
Member Avatar for Taha_3

I got stuck with this problem and it will be great if someone gives a solution.

Member Avatar for JamesCherrill
0
155
Member Avatar for Dragonmh

I have been at this for weeks and I am able to get most of the errors cleared on my own. I am stuck on these errors and I am unable to find out what is really wrong and going on. I am still pretty new at this. The code …

Member Avatar for rproffitt
0
353
Member Avatar for SIyabonga12@#

i need help coding the i2c bmp280 i did start the code myself i just need a way forward

Member Avatar for rproffitt
0
164
Member Avatar for Joedanica

idk why my program is not working, i wanted to create a program that counts even and odd number when a user inputs number except 0. Zero is the terminator of the loop. #include <stdio.h> int main(){ int entNum, ans; int even; int odd; do{ even=0; odd=0; scanf("%d",&entNum); ans = …

Member Avatar for Reverend Jim
0
291
Member Avatar for Muhammad Saqib_1
Member Avatar for Larab Mustafa

If(! found || --count == 0) Count<<"danger"<<endl; Count<<"count="<<count<<endl; Explain its working plzzzz.....

Member Avatar for Reverend Jim
0
124
Member Avatar for Kevin_53

I got an assignment in which I need to create a physics calculator to solve the 'Motion' formulas, this is an screenshot of the formulas I need: [Motion formulas](https://imgur.com/a/sU8SfEk) The problem that I'm having is that I'm literally lost in how to implement them. I have found lots of tutorials …

0
244
Member Avatar for Cpptard

In the below program i am allocating memory for pointer to pointer properly and then allocating individual pointers and setting values properly, even though i am getting the garbage value to one of the structure member, i dont understand where exactly i am going wrong. Request for any expert help. …

Member Avatar for Cpptard
0
657
Member Avatar for naya22

I am working on a math tutoring program that asks the user for a seed value, gives them two random numbers from 1 to 500, and asks them to key in the correct answer. So far, here is my source code: [CODE] #include <iostream> #include <cstdlib> #include <time> #include <conio> …

Member Avatar for Gheorghe_1
0
2K
Member Avatar for Salma_6

Given two arrays (the first array and the second array) of the same size, each consisting of n positive integers, write a program to determine how many unique integers the second array has. Here a unique integer means that it shows only once in the second array but does not …

Member Avatar for Reverend Jim
1
901
Member Avatar for forbesm

Hi guys the problem I'm having is declaring the operand "op". How do you do that? #include <iostream> #include <stdlib.h> using std::cin; using std::cout; using std::endl; #include "expression.h" // include definition of class Calculator // function main begins program execution int main() // print header for Calculator inventory display cout …

Member Avatar for rproffitt
0
351
Member Avatar for cambalinho

how can i print 3 values(without knowing their string\number size) in same column using cout? i'm using these code: cout <<"\n" << "show tokens\n"; for(unsigned int i=0;i<Tokens.size(); i++) { cout << "Token: " << Tokens[i].Token <<right<<setw(20-Tokens[i].Token.size())<< "Type: " << Tokens[i].Type <<setw(40) << fixed << "Position Line: " << i<<"\n"; } …

Member Avatar for rproffitt
0
1K
Member Avatar for joao_9

hello i am developing an application in c ++ and mysql and i am having a lot of difficulties in more specified login in the query where the query needs the user and the pass which are in variables. Can anyone help me? Thanks.

Member Avatar for rproffitt
0
2K
Member Avatar for Pierce_1

How to solve this problem in Code Blocks? Output: Enter 1st number: 10 Enter 2nd number: 10 Enter 3rd number: 10 Enter 4th number: 10 Enter 5th number: 10 Sum of five numbers: 50 Average of five numbers: 10

Member Avatar for rproffitt
0
116
Member Avatar for Rohan_12

Hello Everyone, I have an FPGA application that has some function (i.e: Matrix Multiplication) now I want to create the memory interface for FPGA communication based on the model pushed into the FPGA? For example, If we have the size of 1024 and the size of data is 10 bit …

Member Avatar for rproffitt
0
417
Member Avatar for seiya
Member Avatar for J'nae Thomas

I want a calender to appear, making it so that the customer can chose the dates. #include <iostream> #include <string> #include <ctime> using namespace std; double SubTotal=0.00,Total=0.00, Dis=0.00, DisGCH=0.40, DisConf=0.15, DisSpec=0.05; int NoOfDays=0, TelNumber, CreditCN, GoldCN, RPriceSing=175.00, RPriceDoub=250.00, ConfN; string LName, FName, Address,Occupancy, DisType,GoldCardHolder,ConfDel, CheckInDate; int main(){ cout<< "WELCOME TO …

Member Avatar for rproffitt
0
555
Member Avatar for guitarrick

[I]Last project for the semester and it's late!!! I am in need of some logic with this one....It seemed simple, but now it's out of control. My array with the ASCII converter works, but I can't seem to develop a complete output function to output this 'counter simulator.' Here's the …

Member Avatar for Gabby_2
1
2K
Member Avatar for cambalinho

i'm creating a program using Code Blocks with GNU\GCC compiler. i'm using Windows 10 with Windows Defender. my program create a txt files(instead a text files, we can speak binary files too), but the Windows Defender can delete the file(and i have sure), for avoid these problem i must disable …

Member Avatar for cambalinho
0
4K
Member Avatar for yobbko

I need help with reading data from web page. I wanted to do database of rates (forex). For example: whan price is (eur\usd) 1.4231 then 1.4230 then 1.4229 then 1.4230. I wnated to make text file and application (c\c++) write there those price. In tex file: 1.4231 1.4230 1.4229 1.4230 …

Member Avatar for baabroz1
0
429
Member Avatar for misstj555

Hi. I wanted to review the idea of "Link List" but using C++ and not Java. I borrowed a header file from a textbook to test how a link list works (I know that if I don't paste the whole code [its not my code anyway. It was from a …

0
185
Member Avatar for poop_2

I need help with a code for averaging grades it works on a online compiler but it doesn't work on visual studio 2019

Member Avatar for rproffitt
0
363
Member Avatar for cppcoder

Hi there everybody just needed some help sorting an object array. So the array takes in a title, link, comment, length, and rating of the video. Once the values are put into the array the user inputs whether they want to sort it by title(alphabetically), length of the video (ascending …

0
179
Member Avatar for casey.li.146

Hi All, i would need some advice from you guys from this forum to solve the reading of the CSV file that i had. for example, i have a file which consist of about 2000 records (below are the example of the records) 10/10/2013 10:25:09 AM,5.89,45,264.83,PTTTT 10/10/2013 10:25:13 AM,5.89,2000,11780.00, Some …

Member Avatar for ming_1
0
6K
Member Avatar for Yuichi

I am supposed to sort an array in ascending order..I have tried but then i cant get the results i want.I also tried to look it up in this forum but i still can't get it...Here is part of the code:[ICODE]void sort() { int size=10; int j,temp,i; for(i=0;i<(size-1);i++) { for(j=i+1;j<size;j++) …

Member Avatar for bngwebguru
-1
4K
Member Avatar for rahman_5

Like: if i Can saw what is Happening inside of my code i will understand what type of method i'm actually using ..Like: binary search or stack or Dynamic programming or using special type of algorithm which already developed by someone? Did you guys know ..how i can solve this …

Member Avatar for zevgriner
1
970
Member Avatar for mnyirenda

I have trouble answering the following question. please help with codes for my practice sake. QUESTION: The table below shows the average rainfall and temperature during a rain season stored in a text file called Weather.txt Month Temperature Rainfall Chingola 23 27 Kitwe 24 27 Ndola 23 26 Kabwe 24 …

Member Avatar for mnyirenda
0
355
Member Avatar for misstj555

Hello. I am trying to write a program that solves the "quadratic equation" when given variables "A", "B" and "C" and find the number of zero's. One code is the definition, the next is the implementation and the last code it just the test file. I need help running the …

Member Avatar for misstj555
0
315
Member Avatar for misstj555

Hello. I have to write a code that models a bank account using "C++". It must complete the following functions: (1) Make a withdrawal and deposit (2) change account owner (3) find balance on account (4) create new account However, I can not write all my code in one file …

0
291
Member Avatar for Sappie

Hi, I'm learning C and I was trying to print this program using if-else statement: void main() { char* opinions; printf("What do you think of me?"); scanf("%s",&opinions); if (opinions="Ugly") { printf("Huh, I'm way more beautiful than your heart"); } else if (opinions="Blacksheep") { printf("Sometimes Blacksheeps end up shining the most!"); …

Member Avatar for iJimJones
0
563
Member Avatar for divine_mulengas
Member Avatar for Janependang

Can you help me? *********************** A baggage counter charges $o.50 mimimum fee to deppsit a bag for up to 3 hours and an additional $0.25 for each hour or part thereof over 3 hours. Assume that no bags are deposited for longer than 6 hours time. Write a program that …

Member Avatar for rproffitt
0
280
Member Avatar for misstj555

Hello. I am taking a "Data Structures" class. I have to create a code that will print the following "Output": 8 6 4 2 0 6 4 2 0 4 2 0 2 0 0 I tried doing this code three different ways. Here is the first way. I did …

Member Avatar for misstj555
0
1K
Member Avatar for k_12

Hi im new to programming and i need a bot that autofills a website because i constantly advertise a website on different websites and i basically copy and paste repeatedly for like 5 to 8 hours a day but my friend said i might be able to make a bot …

Member Avatar for rproffitt
0
145
Member Avatar for Sappie

HI, I'm just new to c (programming in general), and I am wondering why getche() echoes every character that I type but not 'Enter' key. Isn't 'Enter' key a character? And also, why does getchar() **-which requires to press enter after typing a character-** echo the 'Enter' along with the …

Member Avatar for DGPickett
0
451
Member Avatar for MosaicFuneral

Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current standard compliant compilers should have <chrono>, <thread>, <random>, and to_string() in suppliment to those more deprecated functions. This …

Member Avatar for DGPickett
2
3K
Member Avatar for MoneshP5

hey i have been given a project need help in coding it **Project Problem:** A company wants you to create a program to manage records and do analysis regarding projects. The company stores all information in a file as follows:  The PROJECT file contains project characteristics such as the …

Member Avatar for MosaicFuneral
0
487
Member Avatar for Prakhar_2

Hey I'm trying to make a sudoku solver. Im stuck at printing the sudoku elements using outtextxy. My command line is : for(i=0;i<w;i++) { for(j=0;j<w;j++) { if(A[i][j]==0) outtextxy(25+40*j,55+10*i," "); else outtextxy(25+40*j,65+10*i,A[i][j]); // outtextxy(25+40*j,55+40*i,"1"); } } where A[][]is the array in which sudoku is stored and the blanks are inputed as …

Member Avatar for rproffitt
0
255

The End.