int main(){
int n;
cout<<"Enter a number: ";
cin>>n;
cout<<n<<" is defrayed as"<<endl;
for(int i=1;i<=n/2;i++){
cout<<i<<"+"<<n-i<<" ";
}
cout<<endl;
}
More Related Contents:
- C++ User defined sequence integers without using arrays [closed]
- c++ removing whitespace fails by using iterators
- How to find out if an item is present in a std::vector?
- Is it good practice to NULL a pointer after deleting it?
- Pointer expressions: *ptr++, *++ptr and ++*ptr
- Writing your own STL Container
- What is the Windows equivalent for en_US.UTF-8 locale?
- What C++ Smart Pointer Implementations are available?
- How to read a complete line from the user using cin?
- C++ cast to derived class
- How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers
- Are multiple mutations within initializer lists undefined behavior?
- A C++ implementation that detects undefined behavior?
- Remove an array element and shift the remaining ones
- Refactoring with C++ 11
- Calculating the Amount of Combinations
- Passing End of Transmission (Ctrl + D) character in Eclipse CDT console
- What is the best way to do input validation in C++ with cin?
- execute C++ from String variable
- What is better, adjacency lists or adjacency matrices for graph problems in C++?
- What does flushing the buffer mean?
- How to initialize `std::function` with a member-function?
- no default constructor exists for class x (inheritance) C++
- error::make_unique is not a member of ‘std’
- Confusion about pointers and references in C++
- Adding signals/slots (QObject) to QGraphicsItem: performance hit?
- ReleaseSemaphore does not release the semaphore
- Why do some people prefer “T const&” over “const T&”?
- c++11 Thread class how to use a class member function
- Why is operator!= removed in C++20 for many standard library types?