C++ examples for Data Type:int
Declare array unsigned int 'values' with 5 elements and initialize the elements to even ints from 2 - 10.
#include <iomanip> #include <iostream> int main(int argc, const char *argv[]) { const int SIZE = 5; unsigned int values[SIZE] = { 2, 4, 6, 8, 10 }; for (int i = 0; i < SIZE - 1; ++i) {/*from w w w. j av a 2 s .com*/ std::cout << values[i]; } }