UAS NO.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> //Nama : Muhammad Rifqi Herdiyansah //NIM : 3420220014 //Prodi : Teknik Informatika using namespace std; // Headers string toString (double); int toInt (string); double toDouble (string); int main() { int n; cin >> n; if (n % 2 == 1) { cout << "Bilangan Ganjil" << endl; } return 0; } // The following implements type conversion functions. string toString (double value) { //int also stringstream temp; temp << value; return temp.str(); } int toInt (string text) { return atoi(text.c_str()); } double toDouble (string text) { return atof(text.c_str()); }
Editor Settings
Theme
Key bindings
Full width
Lines