Articles on Trending Technologies

Technical articles with clear explanations and examples

How to calculate sum of random numbers in between 0 to 100 using files in C Programming?

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 2K+ Views

In this program, we generate random numbers between 0 and 100, calculate their sum, and store the result in a file. The sum will be different on each execution because random numbers are generated based on the current time. Syntax FILE *fptr = fopen("filename.txt", "w"); fprintf(fptr, "format_string", value); fclose(fptr); Algorithm The steps to calculate the sum of random numbers and store in a file are − Generate 100 random numbers between 1 and 100 Calculate the sum of all generated numbers Open a file in write mode Write the sum to the ...

Read More

Loan Agreement

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 611 Views

A loan agreement is a legally binding document that establishes the terms and conditions under which a lender provides money to a borrower. It serves as a contract that protects both parties by clearly outlining repayment obligations, interest rates, fees, and any collateral requirements. This essential financial document ensures transparency and legal protection in lending transactions. Key Components of a Loan Agreement A comprehensive loan agreement typically contains the following essential elements: Parties Involved − Names and contact information of the lender and borrower Loan Principal − The total amount ...

Read More

Write a C program to maintain cricketer's information in tabular form using structures

Mandalika
Mandalika
Updated on 15-Mar-2026 8K+ Views

In C programming, we can use structures to organize and store cricketer information such as name, age, number of matches, and average runs. This program demonstrates how to input multiple cricketer records and display them in a sorted tabular format based on their average runs. Syntax struct structure_name { data_type member1; data_type member2; // ... more members }; Approach We will create a structure to hold cricketer information, input data for multiple cricketers, sort them based on average runs using bubble sort, ...

Read More

Set Text Alignment using CSS

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 2K+ Views

To set text alignment using CSS, use the text-align property. This property controls how text content is aligned within its container element. Syntax selector { text-align: value; } Possible Values ValueDescription leftAligns text to the left (default for most languages) rightAligns text to the right centerCenters the text justifyStretches text to align with both left and right margins initialSets to the default value inheritInherits from the parent element Example 1: Text Justify Alignment The following example demonstrates text justification with multiple columns − ...

Read More

Financial Independence Retire Early (FIRE)

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 270 Views

Financial Independence Retire Early (FIRE) is a financial movement that challenges traditional retirement planning by encouraging people to save aggressively and invest wisely to achieve financial independence much earlier than the conventional retirement age. The goal is to accumulate enough wealth to cover living expenses without relying on employment income, allowing individuals to retire in their 30s, 40s, or early 50s instead of working until their 60s. Formula The FIRE movement is based on the 4% rule and aggressive savings targets: $$\mathrm{FIRE\ Number = Annual\ Expenses \times 25}$$ $$\mathrm{Annual\ Safe\ Withdrawal = FIRE\ Number ...

Read More

Write a C program to calculate the average word length of a sentence using while loop

Mandalika
Mandalika
Updated on 15-Mar-2026 1K+ Views

In C programming, calculating the average word length of a sentence involves counting the total characters (excluding spaces) and dividing by the number of words. This program demonstrates how to use a while loop to process user input character by character and calculate the average word length. Syntax while(condition) { // Process each character // Count characters and words } Algorithm Read the sentence character by character using a while loop Count total characters (excluding spaces) and words Calculate average by dividing character count by ...

Read More

Applying Sepia Effect to Images using CSS3

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 477 Views

The CSS filter property allows you to apply visual effects to images, including the sepia effect which gives images a warm, vintage appearance reminiscent of old photographs. Syntax selector { filter: sepia(percentage); } Possible Values ValueDescription 0%No sepia effect (original image) 50%Moderate sepia effect 100%Complete sepia effect Example: Complete Sepia Effect (100%) Here, we apply a full sepia effect to create a vintage look − .container { display: ...

Read More

Write a C program to print numbers in words using elseif statements

Mandalika
Mandalika
Updated on 15-Mar-2026 5K+ Views

In C programming, we can convert numbers into their word equivalents using else-if statements instead of switch cases. This approach is particularly useful for handling two-digit numbers by breaking them into tens and units places. Syntax if (condition1) { // statements } else if (condition2) { // statements } else if (condition3) { // statements } else { // default statements } Algorithm The program uses multiple else-if conditions to handle different number ranges − Range ...

Read More

Euro Interbank Offer Rate (Euribor)

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 496 Views

The Euro Interbank Offer Rate (Euribor) is a benchmark interest rate that represents the average cost for Eurozone banks to borrow unsecured funds from each other in the wholesale money market. Published daily by the European Money Markets Institute (EMMI), Euribor serves as a critical reference point for pricing various financial products across the European Union. Formula Euribor is calculated using a trimmed mean methodology: $$\mathrm{Euribor = \frac{Sum\;of\;Middle\;50\%\;of\;Submissions}{Number\;of\;Banks\;in\;Middle\;50\%}}$$ Where: Panel Submissions − Daily interest rate quotes from 18-19 participating banks Trimming Process − Highest and lowest 25% of submissions are excluded Middle 50% − Remaining ...

Read More

Converting an Image to Grayscale using CSS3

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 341 Views

The CSS filter property with the grayscale() function is used to convert an image from color to grayscale. The grayscale filter removes all color information, leaving only the luminance values to create a black and white effect. Syntax selector { filter: grayscale(percentage); } Possible Values ValueDescription 0%Original image (no grayscale effect) 50%Partially grayscale (semi-desaturated) 100%Completely grayscale (black and white) >100%Over-grayscale (same as 100%) Example: Converting Image to Grayscale The following example shows how to apply a grayscale filter to an image − ...

Read More
Showing 20561–20570 of 61,299 articles
Advertisements