Home

How to Install Jenkins on Ubuntu

Published on 28-Mar-2022 17:36:25
Jenkins is a software package for software developers. It’s used to automate parts of the testing, build, delivery, and deployment of software. This guide will help you install Jenkins on an Ubuntu 18.04 system. Prerequisites A system running Ubuntu 18.04 Bionic Beaver A user account with sudo privileges Access to a terminal window / command line (CTRL+ALT+T or search > terminal) Java 8 or 11 A Brief Note on J... Read More

Write PHP Program To Check Prime Number

PHP
Published on 16-Mar-2022 8:40:06
PHP Program To Check Prime Number : The below program checks if a number is a prime or a composite number. The PHP echo statement is used to output the result on the screen. Example <!DOCTYPE html> <html> <body>   <?php $num = 13; $count=0; for ( $i=1; $i<=$num; $i++){ if (($num%$i)==0){ $count++; } } if ($count<3){ echo "$num is a prime number.... Read More

Write PHP Program To Print Sum Of Digits

PHP
Published on 16-Mar-2022 8:34:26
PHP Program To Print Sum Of Digits : The below program gives the sum of two variables x and y. The PHP echo statement is used to output the text and sum value to the screen. In a similar way, codes can be written to get a sum of multiple variables in PHP. Example <!DOCTYPE html> <html> <body>   <?php $txt1 = "Sum of x and y is:"; $x = 1234; $y = 4321;   echo "<h3>" . $txt1 . "&... Read More

Recursive program to linearly search an element in a given array using C

Published on 15-Feb-2022 16:04:30
Given an unsorted array and an element x, search x in given array. Write recursive C code for this. If element is not present, return -1. Approach : The idea is to compare x with the last element in arr[]. If an element is found at the last position, return it. Else recur elmntSrch() for remaining array and element x. Program : /* * Approach : The idea is to compare x with the last element in arr[]. * If an element is found at... Read More

Write C Program to Merge Two arrays in C Programming

Published on 22-Dec-2021 18:23:52
Program : C Program to Merge Two arrays in C Programming #include<stdio.h> int main() { int arr1[30], arr2[30], res[60]; int i, j, k, n1, n2; printf("\nEnter no of elements in 1st array :"); scanf("%d", &n1); for (i = 0; i < n1; i++) { scanf("%d", &arr1[i]); } printf("\nEnter no of elements in 2nd array :"); scanf("%d", &n2); for (i = 0; i < n2; i++) { scanf("%d", &arr2[i]); } i = 0; j = 0; k... Read More

Write C Program to Reversing an Array Elements in C Programming

Published on 22-Dec-2021 13:09:28
Program : Reversing an Array Elements in C #include<stdio.h> int main() { int arr[30], i, j, num, temp; printf("\nEnter no of elements : "); scanf("%d", &num); //Read elements in an array for (i = 0; i < num; i++) { scanf("%d", &arr[i]); } j = i - 1; // j will Point to last Element i = 0; // i will be pointing to first element while (i < j) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; i++; // in... Read More

Write C Program to Find Largest Element in Array in C Programming

Published on 22-Dec-2021 9:01:45
Program : Find Largest Element in Array in C Programming #include<stdio.h> int main() { int a[30], i, num, largest; printf("\nEnter no of elements :"); scanf("%d", &num); //Read n elements in an array for (i = 0; i < num; i++) scanf("%d", &a[i]); //Consider first element as largest largest = a[0]; for (i = 0; i < num; i++) { if (a[i] > largest) { largest = a[i]; } } // Print out the Result pri... Read More

Write C++ Program to Find Quotient and Remainder

Published on 21-Dec-2021 14:21:21
In this example, you will learn to find the quotient and remainder of a given dividend and divisor. In this program, the user is asked to enter two integers (divisor and dividend) and the quotient and the remainder of their division is computed. To compute quotient and remainder, both divisor and dividend should be integers. Program :  #include <iostream> using namespace std; int main() { int divisor, divi... Read More

Write C++ Program to Add Two Numbers

Published on 21-Dec-2021 13:11:20
In this program, user is asked to enter two integers. Then, the sum of those two integers is stored in a variable and displayed on the screen. #include <iostream> using namespace std; int main() { int firstNumber, secondNumber, sumOfTwoNumbers; cout << "Enter two integers: "; cin >> firstNumber >> secondNumber; // sum of two numbers in stored in variable sumOfTwoNumbers sumOfTwoNumb... Read More
1 2 3 9