CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <string> // Required for string type
using namespace std;
int main() {
// Floating point number
float myFloat = 3.14;
double myDouble = 3.1415926535;
// Character
char myChar = 'A';
// String
string myString = "Hello, Ahmed!";
// Boolean
bool myBool = true;
// Output the values
cout << "Float: " << myFloat << endl;
cout << "Double: " << myDouble << endl;
cout << "Character: " << myChar << endl;
cout << "String: " << myString << endl;
cout << "Boolean: " << myBool << endl; // Outputs 1 (true)
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Uruchom