klimi
How?
klimi
Anonymous
What is it?
Its vps kind of system
klimi
I mean yes, I know what is a vps I rent one but... What is vps crack?
klimi
https://en.m.wikipedia.org/wiki/Sobel_operator
klimi
Its not that hard to code, I have done it when I knew nothing about C, I'm sure you can do it too
Anonymous
I mean yes, I know what is a vps I rent one but... What is vps crack?
You guess username & password After login into
klimi
You guess username & password After login into
Well.... Like if we are talking about digitalocean, you want to have username and password that has vps on it?
klimi
What? There it is explained in math, so it applies to every language
klimi
No
klimi
If it is on topic, talk here. If it is offtopic, talk in the offtopic group
Nameful
I want send pictures but I can't
Encode them as base64 and send the text here
klimi
Anonymous
klimi
I sent it
Ya, I still don't understand ¯\_ (ツ) _/¯
Anonymous
Ya, I still don't understand ¯\_ (ツ) _/¯
Let me i explain it later now Im buzy:)
Arrithnius
Morning I wrote source code of C++ using Visual studio Code, Now I want to debug & run that program on CMD; - what should I type/give command to compile that code? - and how do I run it? As in Java we compile using this command javac file_name.java and run java file_name
Njabu
I agree with the rules
Gideon
I agree with the rules
ninja
it's a tool to compile the c++ files
ninja
have fun
Alexandr
Hi! Where can I find groups, chats or publics for C/C++ job?
Alexander
In mobile legends
Anonymous
#include<iostream> using namespace std; // sorting in Ascending order void sorting(int values[]) { int sort; for (int i = 0; i < 10; i++) { for (int j = i + 1; j < 10 ; j++) { if (values[i] > values[j]) { sort = values[i]; values[i] = values[j]; values[j] = sort; } } } cout << "\nSorted Array = { "; for (int i = 0; i < 10; i++) { cout << values[i] << " "; } cout << "}" << endl; } // Function to calculate the percentile void percentile (int arr[], int n) { int i, j, count, percent; // Start of the loop that calculates percentile for (i = 0; i < n; i++) { count = 0; for (int j = 0; j < n; j++) { if (arr[i] > arr[j]) { count++; } } percent = (count * 100) / (n - 1); cout << "\nPercentile " << i + 1 << " = " << percent; } } void Avrage(int values[]) { int sum = 0, Mean; for (int i = 0; i <7; i++) { sum = sum + values[i]; } Mean = sum / 10; cout << "Mean Of Array = " << Mean << endl; } void minimum(int values[]) { int min = values[0]; for (int i = 0; i < 10 ; i++) { if (min > values[i]) { min = values[i]; } } cout << "Minimum Value = " << min << endl; } void maximum(int values[]) { int max = values[0]; for (int i = 0; i < 10; i++) { if (max < values[i]) { max = values[i]; } } cout << "Maximum Value = " << max << endl; } int main() { cout << "\n\t\t\t * Performing Diffrent Case Statement * \n" << endl; int a[10] = { 50,20,30,12,43,54,56,34,9,100 }; int choice; cout << "\n\t 1 : For Sorting Values " << endl; cout << "\n\t 2 : For Percentile Of Each Value " << endl; cout << "\n\t 3 : For Mean Of Element " << endl; cout << "\n\t 4 : For Minimum Number " << endl; cout << "\n\t 5 : For Maximum Number " << endl; cout << "\n\t 6 : For Quit Program " << endl; cout << "\nEnter Your Choice : "; cin >> choice; while (choice < 1 || choice > 6) { cout << "Enter Right Choice : "; cin >> choice; } switch (choice) { case 1: cout << "\nInitial Array = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; sorting(a); break; case 2: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; percentile; break; case 3: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; Avrage(a); break; case 4: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; minimum(a); break; case 5: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; maximum(a); break; case 6: break; } cout << endl; return 0; }
Anonymous
#include<iostream> using namespace std; // sorting in Ascending order void sorting(int values[]) { int sort; for (int i = 0; i < 10; i++) { for (int j = i + 1; j < 10 ; j++) { if (values[i] > values[j]) { sort = values[i]; values[i] = values[j]; values[j] = sort; } } } cout << "\nSorted Array = { "; for (int i = 0; i < 10; i++) { cout << values[i] << " "; } cout << "}" << endl; } // Function to calculate the percentile void percentile (int arr[], int n) { int i, j, count, percent; // Start of the loop that calculates percentile for (i = 0; i < n; i++) { count = 0; for (int j = 0; j < n; j++) { if (arr[i] > arr[j]) { count++; } } percent = (count * 100) / (n - 1); cout << "\nPercentile " << i + 1 << " = " << percent; } } void Avrage(int values[]) { int sum = 0, Mean; for (int i = 0; i <7; i++) { sum = sum + values[i]; } Mean = sum / 10; cout << "Mean Of Array = " << Mean << endl; } void minimum(int values[]) { int min = values[0]; for (int i = 0; i < 10 ; i++) { if (min > values[i]) { min = values[i]; } } cout << "Minimum Value = " << min << endl; } void maximum(int values[]) { int max = values[0]; for (int i = 0; i < 10; i++) { if (max < values[i]) { max = values[i]; } } cout << "Maximum Value = " << max << endl; } int main() { cout << "\n\t\t\t * Performing Diffrent Case Statement * \n" << endl; int a[10] = { 50,20,30,12,43,54,56,34,9,100 }; int choice; cout << "\n\t 1 : For Sorting Values " << endl; cout << "\n\t 2 : For Percentile Of Each Value " << endl; cout << "\n\t 3 : For Mean Of Element " << endl; cout << "\n\t 4 : For Minimum Number " << endl; cout << "\n\t 5 : For Maximum Number " << endl; cout << "\n\t 6 : For Quit Program " << endl; cout << "\nEnter Your Choice : "; cin >> choice; while (choice < 1 || choice > 6) { cout << "Enter Right Choice : "; cin >> choice; } switch (choice) { case 1: cout << "\nInitial Array = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; sorting(a); break; case 2: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; percentile; break; case 3: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; Avrage(a); break; case 4: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; minimum(a); break; case 5: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; maximum(a); break; case 6: break; } cout << endl; return 0; }
In this coding percentile is not working please help me anyone
Anonymous
In this coding percentile is not working please help me anyone
I mean not finding percentile of given values
Anonymous
I want to make website
Anonymous
Inbox me if you are interested
Nish
hello, how can I print a char or string multiple times? Like if x == "*" and y == 5.. i want to print "*****"
ninja
use loop
Nish
is it possible without the loop?
Nish
isnt there a simpler way where you could just go "mychar" * 10?
ninja
in my knowledge no
Nish
thanks, ill wait for someone to confirm it. Sorry, I am new to c++ so just trying to understand something i am learning
ninja
OnePunchMan
Nish
In c++ you can use. cout<<string(n,ch) Where n is no. Of times. Ch is character
I tried that, it's showing an error in vscode. I'll show you the code in a moment
ninja
I tried that, it's showing an error in vscode. I'll show you the code in a moment
#include <string> #include <iostream> int main() { std::string a(5,'y'); std::cout<< a; return 0; }
ninja
example code
Anonymous
Hello
Anonymous
Can Anyone expert can help me please
Nish
#include <string> #include <iostream> int main() { std::string a(5,'y'); std::cout<< a; return 0; }
heres my code int main() { int n; cin>>n; for (int i = n; i >= 1; i--) { std::string a(i,' * '); cout << a; } }
Nish
just trying to crate a pyramid
Nish
remove spaces... ' * ' to '*'
cool that works, aren't spaces considered as part of the string
Nish
*Here ch is character not string.. *
makes sense, any similar function to create a string?
Nish
the only logic i am trying to understand here is, why use 2 loops when i can do it in 1 loop
Nish
*Here ch is character not string.. *
also, where can I read the function definition of this? like if i were to understand how is this function printing the chars?
Nish
http://www.cplusplus.com/reference/string/string/string/
sorry if i keep asking questions but that manual page basically says "std::string s0 ("Initial string");".. so why cant i use " * " with spaces?
Nish
okay got it, that works only if you're initializing the string. If you're constructing it using an int then it can only be a char it seems
Abhishek
#include<iostream> using namespace std; // sorting in Ascending order void sorting(int values[]) { int sort; for (int i = 0; i < 10; i++) { for (int j = i + 1; j < 10 ; j++) { if (values[i] > values[j]) { sort = values[i]; values[i] = values[j]; values[j] = sort; } } } cout << "\nSorted Array = { "; for (int i = 0; i < 10; i++) { cout << values[i] << " "; } cout << "}" << endl; } // Function to calculate the percentile void percentile (int arr[], int n) { int i, j, count, percent; // Start of the loop that calculates percentile for (i = 0; i < n; i++) { count = 0; for (int j = 0; j < n; j++) { if (arr[i] > arr[j]) { count++; } } percent = (count * 100) / (n - 1); cout << "\nPercentile " << i + 1 << " = " << percent; } } void Avrage(int values[]) { int sum = 0, Mean; for (int i = 0; i <7; i++) { sum = sum + values[i]; } Mean = sum / 10; cout << "Mean Of Array = " << Mean << endl; } void minimum(int values[]) { int min = values[0]; for (int i = 0; i < 10 ; i++) { if (min > values[i]) { min = values[i]; } } cout << "Minimum Value = " << min << endl; } void maximum(int values[]) { int max = values[0]; for (int i = 0; i < 10; i++) { if (max < values[i]) { max = values[i]; } } cout << "Maximum Value = " << max << endl; } int main() { cout << "\n\t\t\t * Performing Diffrent Case Statement * \n" << endl; int a[10] = { 50,20,30,12,43,54,56,34,9,100 }; int choice; cout << "\n\t 1 : For Sorting Values " << endl; cout << "\n\t 2 : For Percentile Of Each Value " << endl; cout << "\n\t 3 : For Mean Of Element " << endl; cout << "\n\t 4 : For Minimum Number " << endl; cout << "\n\t 5 : For Maximum Number " << endl; cout << "\n\t 6 : For Quit Program " << endl; cout << "\nEnter Your Choice : "; cin >> choice; while (choice < 1 || choice > 6) { cout << "Enter Right Choice : "; cin >> choice; } switch (choice) { case 1: cout << "\nInitial Array = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; sorting(a); break; case 2: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; percentile; break; case 3: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; Avrage(a); break; case 4: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout << "}" << endl; minimum(a); break; case 5: cout << "\nArray = { "; for (int i = 0; i < 10; i++) { cout << a[i] << " "; } cout <<"}"<< endl; maximum(a); break; case 6: break; } cout << endl; return 0; }
You haven't passed any parameter in percentile function call in switch case 2
Nish
Cin>>n; Explain it
well, its just grabbing a number from the user
Nish
Use 2 for loop
that was the point, if theres an alternative to avoid using 2 loops. i was just curious
Anonymous
Write a C++ program to enter a number and print its reverse. Example Input Input number: 12345 Output Reverse of 12345 = 54321
Anonymous
Please send me solution
Pavel
Please send me solution
We are here not to do your homework for you. Try to make it yourself, if you encounter a problem that you don't understand write here explaining the problem (desirable with some code that can reproduce the issue)
Anonymous
Ok
Anonymous
Can you give me a single hint
Anonymous
https://t.me/pdfbookssssss
Pavel
Can you give me a single hint
You can just iterate over symbols of the string and swap them (swap char on position i and on position length-i-1)
Abhishek
Can you give me a single hint
Extract last digit from number and add it in another variable
Abhishek
Rest you have to do by yourself because I had seen here people paste their homework and asking solutions of that without even trying to solve.
Abhishek
Instead you can ask for concept instead of solutions.
Abhishek
Try this Blog
Abhishek
https://www.tutorialspoint.com/c-program-for-print-the-pattern-by-using-one-loop
G
hello everyone