Skip to main content

Simple 'c' program to find square of a given number for beginners | SM53 Just Coding



 Simple Program To Find Square Of A Given Number


    It is the one of the simple programs. In this we have used very simple logic of finding square of a given number which we have studied in school. The logic is very simple as below :-

          square of 2 = 2 * 2,
          that means square of no = no * no

we have implemented it in following program :

Code :- 
            #include<stdio.h>
            #include<conio.h>
            void main()
            {
               int n,sq;
               printf("Enter a Number: ");
               scanf("%d",&n);
               sq = n * n;
               printf("Square of %d is %d ",n,sq);
               getch();
             }

output: 


    When we run the program we give a number as input and compiler process it and gives us square of number as output. Now in this program there is only one input number can give to computer and only one output will displayed.

This is much basic program for beginners

If you do not have turbo c compiler you can compile the program online: 

Check out my video related this program on You Tube :

  

Engineers World.
Programming solutions, pre-compiled codes, ready projects for computer engineering, and many more interesting things...



 Comment Below if any question 🠟🠟🠟 Thank You!


Comments

Popular posts from this blog

  Oasis Infobyte Internship Experience      This blog is about my experience of Oasis Infobyte internship. I received an offer letter from Oasis infobyte for java development internship. I was very happy because of this opportunity. The experience with the oasis infobyte has been great. I have learned a lot from this internship. And got to know the new technologies. Happy to work and learn with Oasis Infobyte.It was great experience. If you are interested in this internship the check out their official website  here  :  http://oasisinfobyte.in/ Thank you. 

Mobile Application Development Answers | Android App Development

Title M Mobile Application Development- Experiment No 1 Answers         Here we have given you the pdf copy of answers of Maharashtra State Board of Technical Education (MSBTE) , Diploma, 6 th Semester - I scheme, Mobile Application Development(22617) - Experiment No 1 from Laboratory manual.       This file include all the questions and their answers as per MSBTE guideline,  All the questions included in the file are as follows:     IX. Practical Related Questions. Q1. List different Android O.S. versions. Q2 . State characteristics of android operating system. X. Exercise. Q1. Draw the architectural diagram of Android operating system. Q2. Differentiate between Windows operating system and Android operating system.     Answers of above questions are given in the file, you can download the file by just clicking the link below. Mobile Application Development(22617) Experiment No 1 Answers  

Simple C program to perform four basic Arithmetic operations Turbo c++. | SM53 Just Coding

           A very Simple program to perform arithmetic operations in single C program.         How to create simple C program to perform four basic Arithmetic operations in Turbo c++. | SM53 Just Coding.            Hi friends, it is an simple c program to calculate Addition/Subtraction/Multiplication/Division using ' Switch-case ' statement. It has a menu and different option to perform. We have used simple logic in this program. Subscribe my channel for more amazing videos Like share the video in your friend. And ask any question down below.  YouTube Video link:-            _https://www.youtube.com/watch?v=5Qb5S4NTLII&feature=youtu.be  Subscribe my channel for more. Comment down if you want to get more information about programing and programing languages. Engineers World. Prog...