Skip to content

Instantly share code, notes, and snippets.

@eduuh
Last active March 8, 2022 09:15
Show Gist options
  • Save eduuh/54a39856323b1abddc4e3112fc419078 to your computer and use it in GitHub Desktop.
Save eduuh/54a39856323b1abddc4e3112fc419078 to your computer and use it in GitHub Desktop.
test
#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;
}
#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