C Program Addition of Two Numbers

C Program Addition of Two Numbers #include <stdio.h> int main() { int addition, num1, num2; printf(“Enter two numbers to add\n”); scanf(“%d%d”, &num1, &num2); addition = num1 + num2; printf(“Sum of the numbers = %d\n”, addition); return 0; } Output Enter two numbers to add 10 200 Sum of the numbers = 210 ——————————– Process exited… Read More »

Loading

C ++ Program Alphabet Triangle Pattern

C Plus Plus Program Alphabet Triangle Pattern Task: Write down a C++ Program to display Alphabet Triangle Pattern. The user will enter the height of triangle. Then the program will show a right angle triangle of alphabets in Capital letters. How Alphbets Triangle Program Works This program uses nested for loops to display the required… Read More »

Loading

Counting Vowels in String Java Program

Topic: Counting Vowels in String Java, Counting Vowels in User Supplied String Java Program This topic covers – How to count the number of vowels in a give string using a Java Program. Source Code: import java.util.Scanner; public class CountingVowels { public static void main(String args[]){ int count = 0; System.out.println(“Enter a sentence :”); Scanner… Read More »

Loading

Java Palindrome String Check

Task: Write down a Java String Program to check for Palindrome. The Source Code of Java Program Check for Palindrome import java.util.Scanner; /** * * @author www.EasyCodeBook.com */ public class StringPalindrome { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print(“Enter a String to check for Palindrome: “); String s1=input.nextLine(); String s2=””;… Read More »

Loading

Java Day Number to Name switch Program

Task: Java Day Number to Name switch Program Java Program – The Use of Switch Statement through practical Java programming- Input a day number from the user Display Day Name. Source Code – Java Day Number to Name switch Program /* * Java Program – The Use of Switch Statement * Input a day number… Read More »

Loading