Apk
This is not a place to get urgent assignment answers
JORGE
Hello
Anonymous
Anonymous
🙏🙏
Anonymous
Good evening .... Has anyone bjarne stroustrup's C ++ Programming book in PDF format?
Alfredo
.
They have a variable equal to 5.
Another variable has been declared, b.
How to code so that variable b gets the value from the above variable a.
.
Can you help me please.
Mandelbröt
.
If the total price is less than $ 50, vat = 0% (0.00)
If the total price ranges from $ 50 to $ 800, vat = 10% (0.10)
If the total price is more than $ 800, vat = 20% (0.20)
.
Write the above program code and display the amount, vat and total (total = amount * (1 + vat))
Anonymous
Thank you rose
DEV 7
Given an array of length N and an integer x, you need to find all the indexes where x is present in the input array. Save all the indexes in an array (in increasing order).
Do this recursively. Indexing in the array starts from 0.
#include <iostream>
using namespace std;
int checknum(int *arr, int* output, int size, int num = 2)
{
static int index = 0;
static int j=0;
if (index >= 0)
{
int val = arr[index];
if (val == num)
{
output[j]=index;
j++;
}
else if(index==size){
return j;
}
else
{
index++;
return checknum(arr, output,size);
}
}
return -1;
}
int main()
{ int output[50],sizeofoutput;
int arr[5] = {1, 2, 2, 3, 4};
sizeofoutput=checknum(arr, output, 5);
for(int i=0;i<=sizeofoutput;i++){
cout<<output[i];
}
return 0;
}
this is my code but got runtime error
Letlhogonolo
Greetings guys I am new doing software engineering and I am using code blocks software to program any recommended textbook to best learn c/c++ language ?
Vikas
#include<iostream>
using namespace std;
void dummy(int* arr){
}
int main(){
int arr[5][5];
dummy(arr);
}
Vikas
Vikas
But when passing 1d array it's working
Big Boss
can I ask win32 GUI development related questions here?
Big Boss
On Windows, there is this thing called “virtual list control/view”, we create the list control with LVS_OWNERDATA, then tell how many items we want it to show by sending LVM_SETITEMCOUNT message with desired number, say 1 million, the control handle the drawing and scrolling and notify parent asking for information (text, image, etc.) needed to draw a specific item.
LVN_GETDISPINFO will then needs to be handled in user code for that
https://docs.microsoft.com/en-us/windows/win32/controls/lvn-getdispinfo
ilyas
Big Boss
Vikas
ilyas
Can we use variable as column size?
if pass the array variables to function , array decay conversion apply to array. So only you can send pointer. In two dimensinoal array after first coulumn you can use.because it correspond to type of pointer.
Vikas
Alex
Hi anyone with language C simplified short notes,kindly share I'll appreciate.
shriman_deepak
#include<bits/stdc++.h>
using namespace std;
int main()
{
int item[10],max,min;
cout<<"Enter the value of items ";
for(int i=0;i<10;i++)
cin>>item[i];
max=item[0];
min=item[0];
for(int i = 0;i<10;i++)
{
if (max<item[i])
max = item[i];
if (min>item[i])
min= item[i];
cout<<"maximum is "<<max<<" minimum is "<<min;
return 0;
}
}
shriman_deepak
i want to print the maximum and minimum value
shriman_deepak
what's wrong in this code ?
shriman_deepak
still it's not working
Madhav
shriman_deepak
Yes
shriman_deepak
#include<bits/stdc++.h>
using namespace std;
int main()
{
int item[10],max,min;
cout<<"Enter the value of items ";
for(int i=0;i<10;i++)
cin>>item[i];
max=item[0];
min=item[0];
for(int i = 0;i<10;i++)
{
if (max<item[i])
{
max = item[i];
}
if (min>item[i])
{
min= item[i];
}
cout<<"maximum is "<<max<<" minimum is "<<min;
}
}
shriman_deepak
right ?
Madhav
shriman_deepak
shriman_deepak
wrong output
Madhav
nope
Then I m a python programmer.. Sorry
shriman_deepak
ah it's okay 😁
Captain
shriman_deepak
shriman_deepak
I did and it worked
Thanks btw
Letlhogonolo
What code should I use for moving any objects c++
Letlhogonolo
Like for example if I where to move the "hello world " which code can I use
shriman_deepak
#include<bits/stdc++.h>
using namespace std;
int main ()
{
int N,M,max=INT_MIN,index = 0;
cin>>N;
for(int i = 0;i<N;i++)
{
cin>>M;
}
for(int i = 0;i<N;i++)
if (max<M)
{
index = i + 1;
}
cout<<index;
return 0;
}
shriman_deepak
What's wrong with this code ?
shriman_deepak
@progfunk
Darryl
☝
Captain
shriman_deepak
What are you doing?
We measured the amount of rain (in millimeters) for N days.
Write a program that determines the day on which the most rain fell.
shriman_deepak
index is the day on which maximum rain fell
Anonymous
Anonymous
pretty straightforward
Captain
Anonymous
shriman_deepak
So i should use array for M ?
shriman_deepak
Captain
Anonymous
How can you hack with C ++?
Anonymous
"Hack" is a VERY vague term
Anonymous
You're right
Anonymous
What C ++ books can you recommend?
Anonymous
Anonymous
This
Amu
does anyone know how to simulate a concurrent customer - supplier system in c++?
Amu
I need help on an assignment
Anonymous
Anonymous
So like, a stdin/out kind of project?
Amu
means they are running in parallel and the program has to be thread safe, stuff like mutex, locks, queues ….
Anonymous
Ok, but what does it do, tho?
You need to multithread something
Tuana
Hello, I have homework
Amu
yes, It generates requests for the customer and also the supplier, multithreads a queue