# program

## C program to find the election winner

In this example, we will create a simple C program that simulates an election. The program allows the user to input the names of candidates and the number of votes they received. After collecting this information, the program determines the winner based on the candidate with the highest number of […]

## C Program to convert Celcius to Fahrenheit

In this program, we will learn how to convert a temperature in Celcius to Fahrenheit. The standard formula to do so is: Fahrenheit = (Celsius * 9/5) + 32 Or  Fahrenheit = (Celsius * 1.8) + 32 Program: #include <stdio.h> int main() { float temp, fTemp; printf("Enter the temperature in

## C++ program to print alphabets from a to z

In this program, we will learn to print all the alphabets using a loop. It should be noted that we can execute a loop on characters too. In such a case the loop runs on the ASCII values of the characters. See also: C program to Find ASCII Value of

## C Program to find Simple Interest

In this program, we will learn how to calculate the simple interest for a given amount at a given rate for a period of time in years. The simple interest can be calculated by the below given formula S.I. = (Principle * Rate * Time) / 100 We will use

## C++ program to print right triangle star pattern

In this program, we will learn how to print a right triangle having stars (asterisk *) as elements. Program 1 (With fixed number of rows) #include<iostream> using namespace std; int main() { int i, j, n = 5; for( i = 1;i <= n; i++) { for(j = 1;j <=

## C++ program to Find the largest among three numbers

In this program, we will learn to find the largest number among the three numbers given by the user. To understand this, you should have knowledge of- Variables How to take user input if…else if…else conditional statement && operator Ternary operator We will do this program by 2 methods- Using

## Python program to remove duplicate characters from a string

In these programs, we will learn how to remove all the duplicate characters from a given string. To understand these codes, you must have the knowledge of the following topics in python: Strings Loops join and append functions ‘in’ and ‘not in’ keywords program 1(Without any inbuilt function) inputstr =

## Python program to reverse the words in a string

In this program, we will learn how to reverse the words in a given string. To understand this, you must have knowledge of the following topics in python:- String Loops Split and join function Step Argument Program 1(By using a while loop) str= "I like to read" print("The given string

## Python Program to find Simple Interest

This is a Python program to find the simple interest for a principal amount at a given rate for a given time. Simple Interest is given by the following formula S.I. = (P * R * T)/100 Where S.I. stands for Simple Interest, P for Principal, R for rate and

## Python program to make a calculator

This is a python program to make a calculator. We simply take two numbers and a choice of operation from the user and display the output. To understand this example, you should have the knowledge of following topics in Python- User input Conditional Statements. User defined functions. Lets get started!