Vitalii
https://pastebin.com/ZbAnVi5G Sorry, the program asks the user to enter the dimension of the array and the method of allocating dynamic memory of this array. The program looks for elements that will be multiples of 3. Everything works correctly, but except for the situation when I allocate memory using "new int". For example, I enter a dimension of 3 x 3 and choose how to create an array "n". It breaks. Can anybody tell me what is the reason?
Vitalii
To my surprise, when I enter dimension of 2 x 3 - it works. I can't understand HOW😂
Xudoyberdi
/report Shivani PM
Anonymous
/report Shivani PM
Send a screenshot of the dialog to PM
Anonymous
/ban Shivani PMing
Xudoyberdi
Send a screenshot of the dialog to PM
Already reported spam, didn't lie...
Xudoyberdi
She just advertised her stuff...
Jaaa
She just advertised her stuff...
And i published her advertisment in my block list🤡
PaAaAria
Hi Does anybody know online compiler which is easy to use with cellphone?
PaAaAria
How did you find this group?
There is no need to Reply if you don't have any answer
!/usr
Hello guys Please help me with this..
Anonymous
For which language
I think Ideone is too heavy for easy use on a mobile browser... Someone isn't using a search engine.
!/usr
# include <iostream> using namespace std; int main(){     cout<<"Enter the length of array"<<endl;     int n, counter, length, cd=0;     cin>>n;     int arr[n];     cout<<"Enter the elements of array"<<endl;     for(int i = 0; i<n ; i++){         cin>>arr[i];     }     for(int i=0; i<n; i++){         cd = arr[i+1]-arr[i];         for(int j =i; j<n; j++){             if (arr[j+1]-arr[j]==cd){                 counter++;             }             else{                 break;             }         }         if(counter>length){             length=counter;         }         counter =0;     }     cout<<length<<endl;     return 0; }
!/usr
Question is
!/usr
Given a set of numbers, find the Length of the Longest Arithmetic Progression (LLAP) in it.
!/usr
Output is not as expected
!/usr
Example: set[] = {1, 7, 10, 15, 27, 29} output = 3 The longest arithmetic progression is {1, 15, 29} set[] = {5, 10, 15, 20, 25, 30} output = 6 The whole set is in AP
Vedant
# include <iostream> using namespace std; int main(){     cout<<"Enter the length of array"<<endl;     int n, counter, length, cd=0;     cin>>n;     int arr[n];     cout<<"Enter the elements of array"<<endl;     for(int i = 0; i<n ; i++){         cin>>arr[i];     }     for(int i=0; i<n; i++){         cd = arr[i+1]-arr[i];         for(int j =i; j<n; j++){             if (arr[j+1]-arr[j]==cd){                 counter++;             }             else{                 break;             }         }         if(counter>length){             length=counter;         }         counter =0;     }     cout<<length<<endl;     return 0; }
use pastebin to share your code
vishal
I just click 😅
!/usr
use pastebin to share your code
https://pastebin.com/SQxkciPX
Anonymous
Want to make mani compiler
Anonymous
Kindly help me
Anonymous
Mani?
Sorry mini
Anonymous
Plz help me i am new in programming.
Igor🇺🇦
Plz help me i am new in programming.
You're new to programming and you want to write a compiler? Really? Try something way, way easier first.
Anonymous
yeah I’d recommend to understand algorithms n logic first
%#%*%*
/get cbook
%#%*%*
/get cppbookguide
раеп
/get
Anonymous
/get
Muammer
/get
Vedant
/get books
Vedant
/get cbooks
Vedant
/get cbook
Wojak
/notes
Wojak
#best-book
Wojak
Anonymous
/notes bingo
Anonymous
/get findprojects
Anonymous
Hi
MK
/notes
Anonymous
What's with people spamming bot commands?
Hunter
Anyone know how to make application in c++
Hunter
.exe file
Anand
I think this is not write way to answer a question of some one..
Anand
Very bad
Prince Of Persia
`c++_isnt_c_with_classes`😅
Renan
`c++_isnt_c_with_classes`😅
It could have been, but now it is a different monster. 🤔
Prince Of Persia
a bigger and different monster
Igor🇺🇦
`c++_isnt_c_with_classes`😅
It started as such. https://en.wikipedia.org/wiki/Cfront
Anonymous
What's with people spamming bot commands?
The bot responds if you click someone else's command... And people screw up commands too.
Anonymous
I'm bored, what shall we code today?
🇹🇯Shex Emad Mziri🇹🇯
Thanks add me
Jaaa
C++
Cppdroid on play store🐲
Anonymous
/notes bingo
Anonymous
/get ot
Anonymous
/get goodgoogling
Prince Of Persia
Which one better? Boost:: variant Std:: variant Using pointers (create a class with myself by using pointers)
Igor🇺🇦
Which one better? Boost:: variant Std:: variant Using pointers (create a class with myself by using pointers)
Always prefer std library over other libraries and especially your own implementation. If std implementation satisfies your requirements use it. You need good reasons to implement your own solution.
Prince Of Persia
After including it say No std::variant class exist
Igor🇺🇦
After including it say No std::variant class exist
Something is wrong with your configuration.
Prince Of Persia
Prince Of Persia
G++9
Vlad
Do you have a std=c++17 flag in your build?
Vlad
Or just blindly assume that the default will work
Prince Of Persia
Vlad
There's __cplusplus define that you can check in code