chevron_left

Recent posts tagged numbers

6 0 4 min.
Hello reader, Welcome to my post :)In this particular post, we shall discuss how we can swap two numbers without using a third temporary variable. We know that in order to swap two numbers, we can make use of a temporary variable, store the first num...
posted Aug 12 kesav.eee 208 points
0 0 1 min.
Find maximum and minimum numbers in an array in javaMaximum: We will find the highest number in an arrayMinimum: We will find the lowest number in an arrayimport java.util.Arrays; public class kodlogs { static int maximum; static int mini...
posted Aug 5 usmanhashmi 211 points
0 0 2 min.
There are so many solutions to this problem. You can check this by using the regular expressions or the ASCII codes but the simplest yet easiest way to do this is by using isLetter() and isDigit() methods in Java.isLetter():This method is defined in ...
posted Jul 31 Hafsa_Rao 358 points
21 2 1 min.
Here, we study about swapping of two numbers without using third variable.We can swap two numbers without using third variable. There are two common ways to swap two numbers without using third variable:By + and -By * and /Program 1: Using + and...
posted Jun 21 Jeevani 120 points
6 0 3 min.
How to generate random numbers c++ Using the random number generator to choose prizes for usersYou can easily imitate dice rolling by using a random number generator.Let's say you are organizing a prize giveaway for your ...
posted May 27 Sanjana Sagar 399 points
8 0 1 min.
Display prime numbers between two intervals#include <stdio.h> int main() { int low, high, i, flag; printf("Enter two numbers(intervals): "); scanf("%d %d", &low, &high); printf("Prime numbers between %d and %d are: ", low, ...
posted May 20 Sanjana Sagar 399 points
0 0 2 min.
Utilize the DCount capacity to include the quantity of records in a space when you don't have to know their specific qualities. Albeit the expr contention can play out a computation on a field, the DCount work essentially counts the quantity of r...
posted May 19 amna 2,504 points
0 0 1 min.
In Java, to find the square root of a number is very easy if we are using the pre-defined method. Java Math class provides sqrt() method to find the square root of a number. In this section, we will create a Java pr...
posted May 17 muliemes 0 points
0 0 1 min.
The Algorithm:To reverse a number, follow the steps given below:First, we find the remainder of the given number by using the modulo (%) operator.Multiply the variable reverse by 10 and add the remainder into it.Divide the number by 10.Repeat the abo...
posted May 17 muliemes 0 points
0 0 3 min.
There are times when it is necessary to use random numbers and in Java we have 2 easy ways to obtain it either with Math.random or with java.util.Random which offers us some more possibilities although its use is just as simple.MATH.RANDOM ():If you ...
posted Oct 18, 2020 amna 2,504 points
0 0 1 min.
In this article, we will see How to generate random numbers in Javarandom numbers within a certain range of the integer, float, double, long, and boolean can be generated in Java.There are three methods to generate random numbers in Java.Method 1: Us...
posted Oct 13, 2020 Hasnain_khan 0 points
0 0 1 min.
Squaring any number in mathematics is pretty simple and in C++ it is similar. We can calculate the square of any number by multiplying it by itself. And that's it, that is all for today. How to calculate the square of any number in c++? ...
posted May 22, 2020 Lalit Kumar 0 points
2 0 1 min.
In this article, we are going to learn how to create random numbers between 1 and 10 in C++? Solution Assign the first number to be 1 and last number to 100Calling function randResult The function rand will give us a value of 0 to...
posted May 12, 2020 Lalit Kumar 0 points
10 0 1 min.
In this article, we are going to learn how to create random numbers between 1 and 100 in C++? Solution Assign the first number to be 1 and last number to 100Calling function randResult The function rand will give us a value of 0 to ran...
posted May 12, 2020 Lalit Kumar 0 points
0 0 2 min.
 #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int no_of_numbers = 100; int first_number = 1; std::srand(std::time(0)); int random = std::rand() % no_of_numbers + ...
posted Apr 17, 2020 Lalit Kumar 0 points
19 1 1 min.
Hi, I am new to this world of programming in java language. You might feel to check if a character is a number in java? I mean what is the best way to do it?Solution:I'm not sure if this is the best option or not, But this seems pretty simpl...
posted Mar 18, 2020 Gavin 0 points
To see more, click for the full list of questions or popular tags.