But when i =2,we can get "if(p[2]>p[3])…" or "if(p[2]<p[3])…",so i mean that we already checked "p[3]",why we need to do it again?
Type: Posts; User: just_rookie
But when i =2,we can get "if(p[2]>p[3])…" or "if(p[2]<p[3])…",so i mean that we already checked "p[3]",why we need to do it again?
My problem is why we need the "if(i==3)" statement?
hi,someone send me a piece of code as follows,but i can not understand this code well,so please do me a favor!Thank you!
#include <cstdlib>
#include <ctime>
#include <iostream>
using...
whiteflags' suggestion is good for me,because I didn't learn generic algorithm.Thank you for your reply!
my code as follows.I used your method,but it cannot solve this problem:
:
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
void displayarr( int arr[],int size )
Hi,all!
Is there a way to detect if a array is sorted or not?
Thank you very much!You taught me a very important lesson!
Thank you! Please post your code ,and i think i will learn something form your code !Thank you again!
Thank you! Please post your code ,and i think i will learn something form your code !Thank you again!
who can help me ?
"Imagine trying to come up with an algorithm for a program that displayed the English
name for a number (example: 1204, one thousand, two hundred four). "
How to work it out?
Hi,everyone
I'm tring to solve this problem ,but i have no idea how to break the number up into chunks of 3 digits and compute the text of a three digit chunk……Just help me! Thanks!