Imagine a barren world where hateful posters inscribed with derogatory and demeaning messages span your horizon. You find people screeching, jeering, and crying with frustration. You find yourself stuck in the middle of a herd of people and they seem to creep ever so slowly towards a lone figure. The shrieks and screams get obnoxiously… Continue reading Milo YianNOpoulos
Month: September 2017
Java: Learning the Basics
Situation: Find the greater number between two numbers. import java.util.*; public class Greaternumber { private int num1, num2; Scanner scr = new Scanner(System.in); { System.out.print("\n\t Enter first number: "); num1=scr.nextInt(); System.out.print("\n\t Enter first number: "); num2=scr.nextInt(); } public void check() { if(num1>num2) { System.out.print("\n\t Greater number is " + num1); } else { System.out.print("\n\t Greater… Continue reading Java: Learning the Basics
Introduction to Object Orientated Programming (OOP)
What is OOP? Object Orientated Programming attempts to demystify and organize programming in a structured manner so that other programmers can work on it as well. It essentially works on objects rather than "actions" and data rather than logic. The language was formed by analyzing the very nature of the real world. The following principles are the… Continue reading Introduction to Object Orientated Programming (OOP)
C++: Learning the Basics – Right Alignment
Situation 1: Pattern shown below but the text is aligned to the right. #include<iostream.h> #include<conio.h> void main() { clrscr(); int sym, rows, space=5; char alpha; for (rows=5, row=1; rows>=1; rows--, row++) { alpha='A'; for(space=0; space<rows-1; space++) { cout<<"\t"; } for (sym=1; sym<=rows; sym++) { if(rows%2==0) { cout<<"\t"<<sym; } else { cout<<"\t"<<alpha; alpha++; } } cout<<"\n";… Continue reading C++: Learning the Basics – Right Alignment
C++: #CoolCodez Part 2
Situation: Making a right angle triangle of numbers and alphabets. 1 A B 1 2 3 A B C D 1 2 3 4 5 #include<iostream.h> #include<conio.h> void main() { clrscr(); int counter, sym,… Continue reading C++: #CoolCodez Part 2