Last active
March 8, 2022 09:15
-
-
Save eduuh/54a39856323b1abddc4e3112fc419078 to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
#include <stdio.h> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
int id = 0; | |
cout << "Enter the Id"; | |
cin >> id; | |
int sum = 0; | |
for(int i = 0; i<=id; i++) { | |
if(i % 2 == 0 ){ | |
sum +=i; | |
} | |
} | |
cout << sum << endl; | |
cout << "I displayed the sum of all even numbers till my ID"<< id; | |
return 0; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
char ch; | |
cin >> ch; | |
if(ch >= 65 && ch <= 90) | |
cout << “UpperCase character”; | |
else if(ch >= 97 && ch <= 122) | |
cout << “Lower Case Character”; | |
else if(ch >= 48 && ch <= 57) | |
cout << “Number”; | |
else | |
cout << “Symbol”; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment