What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-17 22:35:05
yearly interest calculator c++ using for loop
#include <iostream> #include <cmath> #include <iomanip> using namespace std; void main() { // Inputs // double princ = 0.0; double rate = 0.0; int years = 0; int year = 1; double total = 0.0; // Ask User For INFO // cout << &qu... Add solution -
C++ 2022-02-16 06:15:25
divide two polynomials c++
#include <iostream>#include <iterator>#include <vector> using namespace std;typedef vector<double> Poly; // does: prints all members of vector// input: c - ASCII char with the name of the vector// A - refere... Add solution -
C++ 2022-02-12 03:45:02
how to search integer in c++
//******************************************************** // search algorithm for arrays //******************************************************** #include <iostream> using namespace std; void initializeArray(int list[], int listSize); int ... Add solution -
C++ 2022-02-11 10:00:09
c++ program for numerical solution of ordinary differential equations using euler method
#include<iostream> /* defining ordinary differential equation to be solved */ /* In this example we are solving dy/dx = x + y */ #define f(x,y) x+y using namespace std; int main() { float x0, y0, xn, h, yn, slope; int i, n; cout<<"... Add solution -
C++ 2022-02-07 04:40:16
factorial c++ without using function
#include<bits/stdc++.h> #include<stdio.h> using namespace std; int fact(int i){ if (i <= 1) return 1; else return i*fact(i-1); } int main(){ ios::sync_with_stdio(0); cin.tie(0); int N; cin >> N; cout << fact... Add solution -
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 -
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