Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.
Program to print name of a day using switch case statement.
Get link
Facebook
X
Pinterest
Email
Other Apps
Explanation:
Here number is inputted in variable 'day' and when it is equivalent with day in week and matches the preceeding case, it will print whatever in the block given.
P rime Numbers are those which have only 2 factors; by 1 and by themselves own. For examples, the first five prime numbers are 2,3,5,7 and 11. These numbers are divisible by 1 and by themselves. Here, we have to print prime numbers from 1 to 100. So, we have to use for loop. The nested for loop works here, one by variable 'a' and another by 'b' and an increment number is also stored in 'p'. The first loop starts from 1 and inside it, another loop begins until the value of b becomes greater then a. If the remainder when a is divided by b becomes 0. The value of p incremented by 1. If the value is 2 means that first loop also has moved for 2 and value of a is 2. And, so it get printed. The first prime number is extracted and now whenever the divisible of a by b becomes 0, the value inside a gets printed and we will get all the prime numbers. The Output
E veryone needs to convert PDF at some point or the other. But many times it happens that when we need to edit PDF, we do not understand how to do it. Actually PDF cannot be edited directly. For this it has to be converted into word file. PDF is a file format developed by Adobe. Let us know how we can convert a PDF file into WORD file. Here we are telling you 3 ways, from which you can choose according to yourself. 1) Online Free PDF to Word Converte r Whenever we have to convert any PDF file into Word, it can be easily done on any phone or PC. For this, we just have to search PDF to Word Converter on Google and it can be seen that how many websites are converting from PDF to word for free. a) Open any one website. b) Upload the PDF file there. You can upload your files with Dropbox, drag n drop and from computer option. c) After this select 'Convert to Word' option and click on 'Convert' option. d) After this your PDF file will be converted to Word and can be downloade...
A function is a group of statements that together perform a specific task. Function is a block or part of program. A function definition specgifies the name of the function, the types and number of parameters, it expects to receive, and its return type, when any program is very long or same code is repeating many times then we try to cut the program in different parts(blocks) so that whole program become more understandable, easier to debug and size of code will be shorter. A repeated group of instruction in a program can be organized as a function. Every C program has at least one function, which is known as main() function. Why to use function? Functions are used for driving a large code into module, due to this we can easily debug andd maintain code. For example if we write a calculator programs at that time we can write every logic in a separate function(for example sum(), for subtraction sub()). Any function can be called many times. Advantages of Function Code Re-usabi...
Comments
Post a Comment
If you have any doubt, let me know...