C++

How to use ternary operator in C++

How to use ternary operator in C++ with example. Ternary operator is similar to if-else statement but we can use it to write a condition in one line.

Read
C++

std::reverse() method in C++ explanation with example

std::reverse() method of C++ is used to reverse the order of elements in a given range. This post will show you how to use std::reverse() with examples

Read
C++

C++ program to find the square root of a number by using sqrt

How to find the square root of a number in C++ using sqrt method in C++. Find the square root of all numbers from 1 to 100.

Read
C++

How to find the cube of a number using Macros in C++

How to find the cube of a number using Macros in C++. This program will take one user given number and find the cube of that number using macros.

Read
c#

C# program to check if a number is armstrong or not

C# program to check if a number is armstrong or not. It will take one number and print if it is armstrong or not.

Read
c#

How to print yesterday's date in C#

C# program to print yesterday's date. DateTime struct provides the current day and also we can use it to get yesterday's date.

Read
c#

How to print tomorrow's datetime in C#

C# program to print tomorrow's datetime. DateTime struct provides the current day as Today. We can add days by using AddDays method.

Read
c#

C# program to convert a double to integer

How to convert a double to integer in C#. This program will use the Convert class to do the conversion of double to integer.

Read
c#

C# program to get the DateTime for the start of the week

How to get the DateTime for the start of the week in C#. Learn how to do this in different timezones.

Read
c

C program to read an unsigned integer value using scanf

C program to read an unsigned integer value using scanf. The program will read the user input value and store it in an unsigned integer.

Read