What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-29 04:48:02
how to read wav file in C++
#include <iostream> #include <string> #include <fstream> #include <cstdint> using std::cin; using std::cout; using std::endl; using std::fstream; using std::string; typedef struct WAV_HEADER { /* RIFF Chunk Descriptor */ ... Add solution -
Other 2021-09-28 22:08:08
bresenham circle drawing algorithm
#include<iostream.h> #include<graphics.h> void drawline(int x0, int y0, int x1, int y1) { int dx, dy, p, x, y; dx=x1-x0; dy=y1-y0; x=x0; y=y0; p=2*dy-dx; while(x<x1) { if(p... Add solution -
C++ 2021-09-28 19:11:06
how to get string from user in cpp
string firstName; cout << "Type your first name: "; cin >> firstName; // get user input from the keyboard cout << "Your name is: " << firstName; // Type your first name: John // Your name is: John Add solution -
C++ 2021-09-28 17:06:04
Write a C++ program that displays a Letter Pyramid from a user-provided std::string. Prompt the user to enter a std::string and then from that string display a Letter Pyramid as follows: It's much easier to understand the Letter Pyramid given examples.
#include <iostream> #include <string> using namespace std; int main() { string user_input {}, pyra {""}, space (user_input.length() - 1, ' '); cout << "Please enter a sequence of characters... "; cin >>... Add solution -
C++ 2021-09-28 16:43:04
recursion in cpp with reference
#include <iostream> #include <cstdlib> //had to force it becasue my compiler (Code::Blocks) does not contain system. using namespace std; /*int n = 1, sum = 0; int sumDigits(int n, int sum) { // if (n == 0) { return sum; ... Add solution -
PHP 2021-09-28 15:58:04
Displaying the Cart codeigniter
<?php echo form_open('path/to/controller/update/method'); ?> <table cellpadding="6" cellspacing="1" style="width:100%" border="0"> <tr> <th>QTY</th> <th>Item Des... Add solution -
Other 2021-09-28 06:04:05
dice combinations cses
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int max_sum = n*1000; vector<int> x(n); for (int&v : x) cin >> v; vector<vector<bool>> dp(n+1,vector<bool>(max_sum+1,fal... Add solution
Best helpers
Ranking is empty