Skip to content
Snippets Groups Projects

Update Exercise 1 - Data types.txt

Closed Omkar Akolkar requested to merge oa07987/vhb-cpp-en:oa07987-main-patch-42290 into main
1 file
+ 19
0
Compare changes
  • Side-by-side
  • Inline
@@ -8,3 +8,22 @@ Create a variable with the corresponding data type for each of the following bul
- Boolean value
Assign a value to the variables and then display them on the screen.
#include <iostream>
using namespace std;
int main()
{
int num = 2;
float deci = 2.5;
string s = "Hallo";
char letter = 'a';
bool q = 0;
cout << "Int: " << num << endl;
cout << "Decimal: " << deci << endl;
cout << "String: " << s << endl;
cout << "Character: " << letter << endl;
cout << "boolean: " << q << endl;
}
\ No newline at end of file
Loading