public class Block { public static void main(String args[]) { int x=10; blk1: //label {//start of block1 int y=50; ...
Arithmetic Operators in Java (Reference to the textbook of GSEB-XII)
public class ArithOperators { public static void main(String args[]) { short x=6; int y=4; float a=12.5f; //suffix f to expli...
Compare Length of Two different strings using UDF in C Language.
#include<stdio.h> int compLength(char s1[], char s2[]) { int l1,l2; for(l1=0;s1[l1]!='\0';l1++); //length of string1 f...
Reverse the values of an 1D array in C++
#include<iostream> #include<iomanip> using namespace std; int main() { int ar[11]={19,14,23,22,18,25,17,30,9,17,33}, n=1...
Download the GST Invoice Software created in Excel....
Download the File. Click here to Watch the Explanation & Developing Video
Find and Replace a value in an Array (Linear Search)
#include<iostream> #include<iomanip> #include<time.h> #include<stdlib.h> using namespace std; void searchArray() { ...
Search an element in an Array using Linear Search concept in C++ (WITH EXPLANATION VIDEO)
#include<iostream> #include<iomanip> #include<time.h> #include<stdlib.h> using namespace std; void searchArray() { ...
Various Patterns in C++ using Nested Loops
#include<iostream> #include<iomanip> using namespace std; void Pattern1(int n) { int i, j, k, x=1; for(i=1;i<=n;i++) {...
Masking of String with * as password input in C Programming.
#include<stdio.h> int main() { char pwd[20],ch; char mypwd[]="Hello"; int i=0; printf("Enter Password: "...
Find the distinct values, frequency of values and all the elements that appear more than n/k times in a given list. (Using Python)
''' Following logics in single program. Find the distinct values of array Find the frequency of each number of array. Find all ...
SHIFT ALL 0s TO FRONT & 2s AT LAST OF ARRAY WITHOUT USING SORT LOGIC IN C++
#include<iostream> using namespace std; void shiftNumbers(int a[],int n) { int i,j,k,tmp; for(i=0,j=0;i<n;i++) { if(a[i]==...
Cyclic Rotate 1D Array using C++
#include<iostream> using namespace std; void cyclicRotate(int a[],int n) { int tmp,j; tmp=a[n-1]; for(j=n-1;j>0;j--) { a...