• Register

Recent posts tagged numbers

6 0 4 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 440 points
6 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 440 points
0 0 3 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 112,545 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 100 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 100 points
0 0 4 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 112,545 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 100 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 1,240 points
0 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 1,240 points
0 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 1,240 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 1,240 points
16 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 15,250 points
To see more, click for the full list of questions or popular tags.