In India, 0175 (or +91 175) is the STD code (telephone area code) for part of Punjab, including Jalandhar.
In the UK, telephone area code 01759 (or +44 1759) serves Pocklington, just east of York.
Other countries may have domestic area codes like 0175 or 01759.
(The plus sign means "insert your international access prefix here." From a GSM mobile phone, you can enter the number in full international format, starting with the plus sign. The most common prefix is 00, but North America (USA, Canada, etc.) uses 011, Japan uses 010, Australia uses 0011, and many other countries use different prefixes.)
#include<iostream> int main() { int num1, num2; std::cout << "C++ addition program" << std::endl; std::cout << "Enter a number: "; std::cin >> num1; std::cout << "Enter another number: "; std::cin >> num2; std::cout << "The sum is " << num1 + num2 << std::endl; }
#include<iostream> int main() { double a, b; std::cout << "Enter a number: "; std::cin >> a; std::cout << "Enter another number: "; std::cin >> b; std::cout << "Sum: " << a + b << std::endl; std::cout << "Average: " << (a + b) / 2 << std::endl; }
#include <iostream> int main() { int num; std::cout << "Enter a number: "; std::cin >> num; if(num % 2 == 0) { std::cout << "Number is even"; } else { std::cout << "Number is odd"; } return 0; }
Example Code#include#includeunsigned input_num (){unsigned num = 0;while (1){std::cout > num)break;std::cout
#include#includeusing std::cin;using std::cout;using std::endl;using std::string;int main(){string number = "0";cout number;cout
#include<iostream> #include<vector> #include<list> #include<map> #include<time.h> int main() { srand ((unsigned)time(nullptr)); // Create a list of 100 values in the range 0 to 9. std::cout << "Number list:\t"; std::list<size_t> numbers; for (size_t i=0; i<100; ++i) { numbers.push_back (rand()%10); std::cout << numbers.back() << ' '; } std::cout << '\n' << std::endl; // Determine position(s) of each number. std::map<size_t, std::vector<size_t>> map; size_t pos = 0; for (auto it=numbers.begin(); it!=numbers.end(); ++it) map[*it].push_back(pos++); // Print number, frequency and position(s). for (auto it=map.begin(); it!=map.end(); ++it) { std::cout << "Number:\t\t" << (*it).first << std::endl; std::cout << "Frequency:\t" << (*it).second.size() << std::endl; std::cout << "Postions:\t"; const std::vector<size_t>& positions = (*it).second; for (auto it=positions.begin(); it!=positions.end(); ++it) std::cout << (*it) << ' '; std::cout << '\n' << std::endl; } }
'Students roll number for Xii std cbse exam 2009?'
#include<iostream> #include<fstream> int main() { std::ifstream infile ("example.txt", std::ios::in); unsigned chars(0); unsigned words(0); unsigned spaces(0); std::string delim("\t\n "); char ch(0); char last(0); if (!infile.good()) { std::cerr << "The filename is invalid." << std::endl; return -1; } while (infile.get(ch)) { switch (ch) { case (' '): case ('\t'): ++spaces; case ('\n'): // only count words if the last char was not a word delimiter if (delim.find(last) == std::string::npos) ++words; default: ++chars; } last = ch; } infile.close(); std::cout << "Number of chars:\t" << chars << std::endl; std::cout << "Number of words:\t" << words << std::endl; std::cout << "Number of spaces:\t" << spaces << std::endl; }
#include <vector> #include <iostream> #include <stdexcept> const std::vector<std::string> units = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen"}; const std::vector<std::string> prefixes = {"twen", "thir", "for", "fif", "six", "seven", "eigh", "nine"}; std::string inttostr (const unsigned int number) { if( number <= 14 ) return units.at (number); if( number < 20 ) return prefixes.at (number-12) + "teen"; if( number < 100 ) { unsigned int remainder = number%10; return prefixes.at (number/10-2) + (remainder ? "ty-" + inttostr (remainder) : "ty"); } throw std::out_of_range("inttostr() value too large"); } int main (void) { try { for (int i = 0; i <= 99; ++i) std::cout << i << " = " << inttostr(i) << std::endl; } catch (std::exception& ex) { std::cerr << "Error: " << ex.what() << std::endl; } return 0; }
The Number - 2011 STD Test 1-9 was released on: USA: 24 June 2012
#include<iostream> #include<sstream> int input_num (std::string prompt) { int num = 0; while (1) { std::cout<<prompt<<": "; std::string input=""; getline (std::cin, input); std::stringstream ss (input); if (ss>>num) break; std::cout<<"Invalid input.\n"; } return (num); } int main() { while (1) { int num = input_num ("Enter a number (0 to exit)"); if (!num) break; if (num%7) std::cout << "The number is not divisible by 7.\n" << std::endl; else std::cout << "The number is divisible by 7.\n" << std::endl; } }
STD code for France is 0033