What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-01 04:50:46
matrix multipliction in c++
#include <iostream> using namespace std; int main() { int a[10][10], b[10][10], mult[10][10], r1, c1, r2, c2, i, j, k; cout << "Enter rows and columns for first matrix: "; cin >> r1 >> c1; cout << ... Add solution -
C++ 2022-01-31 21:17:58
how to delete an element in vector pair in cpp
#include <iostream> #include <utility> #include <vector> using namespace std; int main() { vector< pair<int, int> > v; int N = 5; const int threshold = 2; for(int i = 0; i < N; ++i) v.push_back(m... Add solution -
Other 2022-01-31 09:47:24
find is number prime
int number; cin >> number; if (number == 2) { cout << "Prime" << endl; return; }else if(number == 1 || number % 2 == 0){ cout << "Not prime" << endl; return; } for (int i = 3; i * i <= number; i+=2)... Add solution