Posts

Showing posts with the label react

Selection sort (code & Algorithm)

Image
I n this blog you have to know all about the Selection sort, Step by step how to work Selection sort Algorithm and also you have to know how to write code in an easy way for selection sort. In Selection sort we are arranging unordered number in a correct order, Examples: This is unordered number (9,6,4,7,3,2,4,5,) but by using selection sort we can arrange in ascending order (2,3,4,5,6,7,9) this is our selection sort, to arrange in an order of given unorder number.       A lgorithm: f C ode for Selection sort: #include <stdio.h> // Function to perform selection sort on an array void selectionSort ( int arr [] , int n ) {     int i , j , min_idx , temp ;     // One by one move boundary of unsorted subarray     for ( i = 0 ; i < n - 1 ; i ++ ) {         // Find the minimum element in unsorted array         min_idx = i ;         for ( j = i + 1 ; j < n...

C Program to Write Square of any Number - Aman The Programmer

Image
Calculate Square of any Number: This Program is allowed to user, enter the number and get Square of that number. This program makes easy to calculate Square of any Number ......  https://youtu.be/9XJq-RYcYYo?si=XB6UVDBnHKjUsQh3 #include <stdio.h> int main () {     int number, square;     printf ( "enter the integer:" );     scanf ( " %d " , & number);     square = number * number;     printf ( "the square of %d is %d " , number , square);     return 0 ; } Output: Click here to get more Source Code:   https://amantheprogrammer.blogspot.com/2024/10/html-code-for-beginners.html https://youtu.be/iGJtLh0lsZo https://youtube.com/@amantheprogrammer?si=O8SGDjNhKTD5Xs-N

HTML code for Beginners

Image
First HTML code: Code: <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title >Bassic HTML COde</ title > </ head > < body > < b >< center > Basic HTML Code Learn with Aman The Programmer</ center ></ b > </ body > </ html > OUTPUT:       Basic HTML Code Learn with Aman The Programmer CLICK HERE: https://amantheprogrammer.blogspot.com/2024/10/write-any-table-by-using-programming.html

Write any Table by using Programming

You can write any table of any number code : #include <stdio.h> int main () {     int i,number;     printf ( " Enter the number :" );     scanf ( " %d " , & number);     for (i = 1 ; i <= 10 ; i ++ )     {         printf ( " %d\n " , i * number );     }     return 0 ; } Output:   Enter the number : 8 //you can enter any number 8 16 24 32 40 48 56 64 72 80  Click the Link,Practice more Problem: https://amantheprogrammer.blogspot.com/2024/10/division-of-two-number-in-c-language.html

Division of Two Number in c language ?

        Let's Start the Coding for Division                                                              Code: #include <stdio.h> int main () {  /* division of two number*/     int a, b, c;     printf ( "enter two number for division:" );     scanf ( " %d %d " , & a, & b);     c = a / b;     printf ( "Division of two number is %d Divide %d = %d " , a, b, c);     return 0 ; } Output: enter two number for division:4 2 Division of two number is 4 Divide 2 = 2 Click here , For more coding practice: https://amantheprogrammer.blogspot.com/2024/10/multiplication-of-two-number-by-using-c.html

Multiplication of two number by using C Programs

Image
Multiplication of two number by using C Programs   Let's Understand Step by Step: Algorithm : Start : Take two numbers,  a  and  b . Initialize : Set a result variable,  r e s u l t , to 0. Loop : Iterate until one of the numbers (say  b ) is 0. If  b  is odd, add  a  to  r e s u l t . Double  a  (i.e.,  a = a × 2 ). Halve  b  (i.e.,  b = b / 2 ). End : The  r e s u l t  now contains the product of  a  and  b .   Flow chart :               Program for multiplication:    #include <stdio.h> int main () {     int a,b,c;     printf ( "enter two number:" );     scanf ( " %d %d " , & a, & b);     c = a * b;     printf ( "multiplication of %...

Hello World

This is a First Code of C Language  Hello World #include <stdio.h> int main () {     printf ( "Hello World" );     return 0 ; } Output :  Hello World What is C Programming Langauge? C  is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more. It is said that ‘C’ is a god’s programming language. One can say, C is a base for the programming. If you know ‘C,’ you can easily grasp the knowledge of the other programming languages that uses the concept of ‘C’

Subtraction of Two Number by using C Language

Subtractions   of   Two   Numbers   : #include <stdio.h> int main () {     int a, b, c;     printf ( "enter two number for substraction:" );     scanf ( " %d %d " , & a, & b);     c = a - b;     printf ( "substraction of two number id %d and %d is = %d " , a, b, c);     return 0 ; } 💢  Output  : enter two number for substraction:101 , 109 subtracti on of two number id 101 and 109 is = -8   Algorithm to Subtract Two Numbers Start . Start . Read  two numbers as  A  and  B . Calculate the  difference  of the two numbers:  Difference = A - B . Display  the value of  Difference . Stop 💢  Flowchart for Subtracting Two Numbers     +-------------------+    |    Start          |    +-------------------+           ...