×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Tutorix
Login
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Q/A
Library
eBooks
Courses
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Hafeezul Kareem
has Published
387
Answers
Number is divisible by 29 or not in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:44:56
It's a straightforward problem. We can use the modulo (%) operator to check whether the given number is divisible by 29 or not. Let's see some examples.Input29 254Output1 0AlgorithmImplementationFollowing is the implementation of the above algorithm in C++#include <bits/stdc++.h> using namespace std; bool isDivisibleBy29(long long n) { return n ...
Read More
Multiply two polynomials in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:43:04
The coefficients of each term of the polynomial are given in an array. We need to multiply the two polynomials. Let's see an example.InputA = [1, 2, 3, 4] B = [4, 3, 2, 1]Output4x6 + 11x5 + 20x4 + 30x3 + 20x2 + 11x1 + 4AlgorithmInitialise two polynomials.Create a ...
Read More
Multiply two numbers represented by Linked Lists in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:40:20
Given two linked lists with digits in it. We need to multiply two numbers formed by the linked list. It can be done easily by forming the numbers from the two linked lists. Let's see an example.Input1 -> 2 -> NULL 2 -> 3 -> NULLOutput2 -> 7 -> 6 ...
Read More
Multiply two numbers represented as linked lists into a third list in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:37:17
Given two linked lists with digits in it. We need to multiply two numbers formed by the linked list. It can be done easily by forming the numbers from the two linked lists. Let's see an example.Input1 -> 2 -> NULL 2 -> 3 -> NULLOutput2 -> 7 -> 6 ...
Read More
Multiply Large Numbers represented as Strings in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:32:29
Given two numbers in the string formats. We need to multiply them. The idea to solve the problem is to maintain a previous digit multiplication answer and carry. We can use the previous digits multiplication answer and carry to get the next set digits multiplication.Let's see an example.Input15 2Output30AlgorithmInitialise the ...
Read More
Multiply any Number with using Bitwise Operator in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 02-Jul-2021 11:01:35
In this tutorial, we are going write a program that multiplies the given two numbers using bitwise operators.The left shift (<<) operator is used for the multiplication whereas the right shift (>>) is used for the division.The multiplication of two numbers x, y can be written as x * y ...
Read More
Multiply a number by 15 without using * and / operators in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 01-Jul-2021 07:04:46
We can using left shift (<<) operator to multiply with 15. If we left shift 1, then we are multiplying it with 2.If we left shift the given number with 4, then we will get the 16 * n. Subtracting the given number from 16 * n will result in ...
Read More
Multiply a given Integer with 3.5 in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 01-Jul-2021 07:01:12
To get the result of n * 3.5 we need to calculate (n * 2) + n + (n / 2). Moving the bits to left by 1 will give you n * 2 and moving the bits to right by will you n / 2. Add those to get ...
Read More
Multiples of 3 or 7 in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 01-Jul-2021 06:57:40
Given a number n, we need to find the count of multiples of 3 or 7 till n. Let's see an example.Input100Output43There are total of 43 multiples of 3 or 7 till 100.AlgorithmInitialise the number n.Initialise the count to 0.Write a loop that iterates from 3 to n.Increment the count ...
Read More
Multiples of 3 and 5 without using % operator in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 01-Jul-2021 06:54:17
We can find the multiples using % operator without any hurdles. But, the problem states that we can't use % operator.Here, we make use of the + operator. We can get the multiples by adding 3 or 5 to the previous multiple. Let's see an example.Input15Output1 2 3 - Multiple ...
Read More
Previous
1
2
3
4
5
6
7
...
39
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout