Saturday, 18 August 2018

What Is Difference Between Save and Save As ?

What Is Difference Between Save and Save As ?

What Is Difference Between Save and Save As ?


Hello friends, in this post we are going to see the difference between save and save as. this is very little thing but many of us didn't know the actual difference between the save and save as. so lets see-

difference between save and save as

When we write any document or file,in the file menu typically you will see the two options, that is save and save as. lets see when when should you use save and save as-

when you write any document and you want save it first time then, you can save it by using both options "SAVE" and "SAVE AS". both options will save your document.

when you made any changes in the document or add some text in your document, then for saving it you should use "SAVE" option.

when you want to make  a copy of any saved document or currently opened document then choose the option "SAVE AS" and give another name to it. it will create a copy of that file with another name.

hope you understand the difference between save and save as options, still if you have any problem you can ask us through comment box.


Factorial Program In C

Factorial Program In C

Factorial Program In C

Before going to see factorial program in c we will see what is the factorial means. lets see what is concept of factorial number-

What is a Factorial Number

factorial number is nothing but the multiplication of all smaller  numbers of that particular number including itself. for better understanding see the following example-

if we want to ascertain 5!(factorial of 5) then,

5!=5*4*3*2*1

means 5!=120.(factorial of 5 is 120)

(note: factorial is denoted by '!' mark.)

we can write factorial program using many ways ,but here we will see the programs using for loop,while loop and c factorial program using function recursion.

c factorial Program : Using For loop


#include<stdio.h>
void main() 

 int num,i;
int fact=1; 
 printf("Enter a number To Find Out Factorial: "); 
  scanf("%d",&num); 
    for(i=1;i<=num;i++){ 
      fact=fact*i; 
  } 
  printf("The Factorial of %d is: %d",num,fact); 
getch();

Output:

Enter a number To Find Out Factorial: 4
The Factorial of 5 is: 24

C Factorial Program: Using While Loop

#include<stdio.h>
# include<conio.h>
void main()
{
 int num,fact=1,copyno=0;
 printf("Enter Number To Findout Factorial:");
 scanf("%d",&num);
 copyno=num;
 while(num>0)
 {
  fact=fact*num;
  num--;
 }

 printf("Factorial of %d is:%d",copyno,fact);
 getch();
}

Output:

Enter Number To Findout Factorial:3
Factorial of 3 is :6

C Factorial Program : Using Function Recursion


#include<stdio.h>

long fact(int n)
{
  if (num == 0)
    return 1;
  else
    return(num * factorial(num-1));
}
 
void main()
{
  int num;
  long factNum;
  printf("Enter a number To Find Out Factorial: ");
  scanf("%d", &num); 
 
  factNum = fact(num);
  printf("Factorial of %d is %ld\n", num, factNum);
  getch();

Output:

Enter a number To Find Out Factorial: 5
Factorial of 5 is: 120

Wednesday, 15 August 2018

How to fix Epson Horizontal Line Problem in Print


How to fix Epson L565, L210, L130, L220, L310, L360, and L380 L365 lines on printing
How to fix Epson Horizontal Line Problem in Print

Epson is one of the best all in one ink jet printer. But every ink jet printer have some common printing problem.

When printing colored documents or black and white document, there are horizontal bandings, lines on the print. Then how to fix this problem?
If you are facing same problem then follow the given steps to solve your problem.

How to fix Epson Horizontal Line Problem
This tutorial is helpful for Epson every model like L380, L360, L365 etc.
Whenever you print a page, print have horizontal lines on it. Then first solution is:

1. Run a Nozzle Check:
Run a nozzle check then you can see the actual problem which is shown in the following image.
How to run nozzle check
Open devices and printers -> Right click on Printer then click on printing preferences -> Click on Maintenance tab -> after that print the nozzle pattern.
nozzle check epson printer

If lines pattern are not good which is show in the following image 
Run a Nozzle Check

then we have to do head cleaning.

2. Head Cleaning:
How to do head cleaning
Open devices and printers -> Right click on Printer then click on printing preferences -> Click on Maintenance tab -> click on head cleaning.
It will take 1-2 minute for head cleaning process after head cleaning print the page and see, horizontal line problem has been solved successfully.


Sunday, 12 August 2018

How To Create Table In SQL Server

Create Table In SQL Server

Create table In SQL Server
Create table In SQL Server


Friends in previous post we learned about how to create database in SQL server using SQL Query and using GUI. in this post we are going to learn how to create table in SQL Server.like a database you can also create table using two different methods in SQL Server, using SQL Query and using GUI. lets see-

Create Table In SQL Server Using SQL Query

Open SQL server management studio.

Then select on "New Query" Option, or simply press the shortcut key "Cttrl + N".

then select your database in which you want to create table. to select specific database type following SQL Query

syntax:

use database_name   

(Note: in place of database_name type your database name in which you want to create a new table.)
 
for ex. use students

after executing above command you will see the your database name in available database name in box.

now to create table type following command

syntax:

create table table_name
( coluumn name  datatype(size),
  coluumn name  datatype(size),
   .
   .
   .
   coluumn name  datatype(size)
)


for Example

create table class2
( sr_no int,
  stu_name varchar(10),
  stu_age  int
)


that's done your table will be created in your selected database.


Create Table In SQL Server Using GUI

you can also create table in SQL server using GUI. lets see-


Open the SQL Server management studio


Then Expand the database option available on left hand side.





you will see the list of available databases. now expand database in which you want to create table.



Now you will see the "Table" option right click on it



select "Table" from drop down. 


now a table format will be open look like this-




fill the information column name,datatype and allow null as you want.


you can also change the table properties from properties window available  at right side.



Then press CTRL + S  to save the table. if you didn't give name for your table it will ask for table name. type table name and press OK. that's done your table is ready.


if you still have any problem please ask us through the comment box.

Saturday, 11 August 2018

How to Create SQL Database

How To Create SQL Database?

create SQL Database
create SQL Database


SQL is an very simple query language. creating SQL database is a basic and very simple  but important task in the SQL. In this post we are going to learn how to create SQL database using the SQL Query and also using GUI. lets see -

Create SQL database using SQL Query

To create SQL database using SQL Query first open the SQL server management studio.

Then in SQL server management studio click on "New Query" option shown below the menu bar or simply you can use shortcut key " ctrl + N ".

It will open the work area for executing SQL Queries.

Type following SQL commmand 

create database YourDatabaseName

(Note: Type your database name in place of " yourDatabaseName".)

Then select this command

Click on "Execute" option or simply use "F5" key to execute command.

It will create database for you.


Create SQL database using GUI


SQL server management studio aslo provide Graphical User Interface  to create databse. see-

Open the Sql server management studio

Now you will see the Database option on left hand side






Now right click on "Database" option, you will see " New database" option, click on that




New  New window will open, in that type the database name that you want give to your new database



 And click "ok". it will create database for you. you can see database under the database option



That's done. your database is created successfully.

Still if you have any problem you can feel free to ask your problem through the comment box,we will help you.

Thursday, 9 August 2018

C Prime Number Program

C Prime Number Program

C Prime Number Program
C Prime Number Program

In this post we are going to see  c prime number program. in which we will see how to check where given number is prime number or not a prime number through a very simple logic in c prime number program.
  
Before that for your better understanding we will see what is prime number means-

what is prime number?

"prime number is nothing but the number which can be divisible by only '1' and 'itself number' only."

means a number which cant be decide  by any other number other than 1 and itself number.

for example: suppose 5 is a number. 5 can be only divisible by 1 and 5, so that it is prime number. take another number 6, 6 can be divisible by 1,2,3 and 6, so that it is not a prime number.

hope you understand logic of prime number. lets see how to write c  prime number program.

c prime number program 


#include<stdio.h>
# include<conio.h>
void main()
{
  clrscr();
  int num=0,count=0,i=0;
  printf("Enter any number to check where it is prime or not:");
  scanf("%d",&num);
  for(i=1;i<=num;i++)
  {
   if(num%i==0)
   count=count+1;
   }
   if(count==2)
   {
   printf("Entered Number is a Prime Number");
   }
   else
   {
   printf("Entered Number is Not a Prime Number");
   }
   getch();

}

Output:


Enter any number to check where it is prime or not: 5
Entered Number is a Prime Number

hope you have understand the prime number program in c. if you have still any concern about it you can fill free to ask in comment box.

Saturday, 4 August 2018

calculator program in c using functions

Here we will discuss about how to make calculator using C Program. Wap to write a program in c to make calculator by using function.


calculator program in c using functions


calculator program in c using functions


#include<stdio.h>
#include<conio.h>
#include<math.h>
int sum(int,int);
int product(int,int);
int subtract(int,int);
void main()
{
clrscr();
int a,b,result=0;
char op;
printf("Enter 1st number, operator and 2nd number ");
scanf("%d %c %d",&a,&op,&b);
if (op=='+')
{
result=sum(a,b);
printf("sum = %d",result);
}
if (op=='*')
{result=product(a,b);
printf("product = %d",result);
}
if (op=='-')
{
result=subtract(a,b);
printf("subtraction = %d ",result);
}
getch();
}
int sum(int a,int b)
{return a+b;
 }
int product(int a,int b)
{
return a*b;
}
int subtract(int a,int b)
{
return a-b;
}

Saturday, 28 July 2018

C Fibonacci Series

C Fibonacci Series

C Fibonacci series


Hello Friends, in this post we are going to learn how to create c Fibonacci series. We will create the Fibonacci series using the c program. But before that we will see what Fibonacci series is-

What is Fibonacci series?


Fibonacci series is nothing but the series of numbers in which the sum of previous two numbers will determines the next number of series.

For example

 0, 1, 1, 2, 3, 5, 8, 13, 21 etc.

Note: Fibonacci series starts from the 0 and 1.

C Fibonacci series program


We can write a c Fibonacci series program in two different ways- that’s the program using the recursion and program without the recursion.

Program 1: c Fibonacci series program without recursion


/* C Fibonacci series program  */
#include <stdio.h>
#include<conio.h>
void main()
{
  int Num, firstNum = 0, secondNum = 1, next, count;
  printf("Enter the end number of Fibonacci series\n");
  scanf("%d", &Num);
  printf(" %d is the termination number of Fibonacci series are:\n", Num);
  for (count = 0; count < n; count++)
  {
    if (count <= 1)
      next = count;
    else
    {
      next = firstNum + secondNum;
      firstNum = secondNum;
      secondNum = next;
    }
    printf("%d\n", next);
  }

  getch();
}


Program 2. C Fibonacci series program using function recursion


#include<stdio.h>
#include<conio.h>

int f(int);

void main()
{
  int num, i = 0, count;

  scanf("%d", &num);

  printf("Fibonacci series termination number:\n");

  for (count = 1; count <= num; count++)
  {
    printf("%d\n", f(i));
    i++;
  }

  getch();
}

int f(int num)
{
  if (num == 0 || num == 1)
    return num;
  else
    return (f(num-1) + f(num-2));
}