# Category Archives: School Programming

## Output of C programs | Set 62 (Declaration & Initialization)November 24, 2017

Prerequisite : Declaration & Initialization in C programming Q1. Consider the following code: What would be the output of the above code? A. 2 B.… Read More »

## Program to print interesting pattern in Java.November 20, 2017

Java Program to print following pattern: ********1******** *******2*2******* ******3*3*3****** *****4*4*4*4***** ****5*5*5*5*5**** ***6*6*6*6*6*6*** **7*7*7*7*7*7*7** Examples: Input : 4 Output : ********1******** *******2*2******* ******3*3*3****** *****4*4*4*4***** Input :5… Read More »

## Python program maximum of threeNovember 19, 2017

Given three number a b and c, the task is that we have to find the greatest element in among in given number Examples: Input… Read More »

## Swap three numbers in cycle

Given three numbers, swap them in cyclic form. First number should get the value of third, second should get the value of first and third… Read More »

## Printing string in plus ‘+’ pattern in the matrixNovember 17, 2017

Given a string, print it inside a matrix in such a way that a ‘plus’ is formed. Examples: Input: TOP Output: X T X T… Read More »

## Calculate Volume and Surface area Of Sphere

Given radius of sphere, calculate the volume and surface area of sphere. Sphere: Just like a circle, which geometrically is a two-dimensional object, a sphere… Read More »

## Calculate Volume, Curved Surface Area and Total Surface Area Of CylinderNovember 16, 2017

Given radius and height of Cylinder, calculate the volume, total surface area and curved surface area of cylinder. Volume of Cylinder: The volume of cylinder… Read More »

## Program for diamond pattern with different layersNovember 14, 2017

Given a number n and using 0-n numbers u have to print such a pattern. Examples: Input : n = 5 Output : 0 0… Read More »

## Program to Calculate Body Mass Index (BMI)November 13, 2017

The Body Mass Index (BMI) or Quetelet index is a value derived from the mass (weight) and height of an individual, male or female. The… Read More »

## Generate a pythagoras triplet from a single integerNovember 12, 2017

Given a single integer n [1, 1000000000], generate a pythagoras triplet with includes n as of it’s sides if possible. Examples: Input : 22 Output… Read More »

## Program to check for ISBNNovember 10, 2017

An ISBN (International Standard Book Number) is a 10 digit number that is used to identify a book. The first nine digits of the ISBN… Read More »

## Calculate the Discriminant ValueNovember 9, 2017

In algebra, Discriminant helps us in deducing various properties of the roots of a polynomial or polynomial function without even computing them. Let’s look at… Read More »

## Program to check for Peterson number

A number is said to be a Peterson number if the sum of factorials of each digit of the number is equal to the number… Read More »

## Inner reducing pattern printingNovember 7, 2017

Given a number N, print the following pattern. Examples: Input : 4 Output : 4444444 4333334 4322234 4321234 4322234 4333334 4444444 Explanation: (1) Given value… Read More »

## Print symmetric double triangle pattern

Given a value n, we need to print the following pattern accordingly, using only constant extra space. Examples: Input : n = 1 Output :… Read More »