Tag: Basic program
-
CC Program – Structure
Before we begin with our basic concepts of the C programming language let's take a look at the C Program…
February 3, 2022
-
JavaSimple Hello World Program
Requirement for Java Hello World Program: Install the JDK if you don’t have installed it, download the JDK and install it. Set…
April 19, 2022
-
JavaAssociation, Composition & Aggregation in Java
Association: Association is a relation between two separate classes which establishes through their Objects. One-to-one, one-to-many, many-to-one, and many-to-many associations…
May 21, 2022
-
C++Hello World program
Program code: Output: #include<iostream>: A number sign (#) at the start of a line instructs the compiler’s pre-processor. The <iostream>…
November 5, 2022
-
C++Adding two numbers
Program code: Output: where, int sum=0: A variable can be initialized during the declaration process. This is usually done to…
November 5, 2022
-
C++Even Or Odd number check
A number is even if it is divisible by two, and odd if it is not divisible by two. Some…
November 5, 2022
-
C++Program to Find ASCII Value of a Character
In C++ programming, a character variable stores an ASCII value (an integer number between 0 and 127) rather than the character…
November 5, 2022
-
C++Sum Of Series 1 + 2 + 3 + 4 + 5 + 6 . . . . n
The sum of a series consisting of n terms beginning with “1,” is equivalent to the sum of n natural numbers…
November 5, 2022
-
C++Sum Of Series 1 + 1 / 2 ^ 2 +. . . . 1 / n ^ n
A program to compute the sum of a given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n. For this,…
November 5, 2022
-
C++Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n
Program code: Output: Main Logic used here: Note: also read about Sum Of Series 1 + 2 + 3 + 4…
November 5, 2022
-
C++Pascals triangle
Pascals triangle is a triangular array of binomial coefficients. The numbers outside Pascals triangle are all “0”. These “0s” are…
November 8, 2022
-
C++Check for Prime number
A prime number is greater than one and can be divided by one or itself. In other words, prime numbers…
November 11, 2022