Learn C Language Online

Learn C Language Online Easy way to learn C Language at your place. You can also share you experience and Programming knowle

      uname Admin  password 112285void main(){char username[10];int pass;printf("Enter Username : ");scanf("%s",username...
06/11/2017



uname Admin
password 112285

void main()
{
char username[10];
int pass;
printf("Enter Username : ");
scanf("%s",username);
printf("\nEnter Password");
scanf("%d",&pass);

if(username!=uname)
printf("\nUsername is wrong");
else if (pass!=password)
printf("\nWrong Password");
else
printf("Login Successfully");

getch();
}

13/01/2017

Updated version of 'C Solutions' coming soon...
With tutorials
And more than 100 new programming excersis...

QUESTION:----------------Area of a triangle is given by the formula  A=sqrt(S(S-a)(S-b)(S-c))Where a, b and c are sides ...
30/12/2016

QUESTION:
----------------

Area of a triangle is given by the formula
A=sqrt(S(S-a)(S-b)(S-c))
Where a, b and c are sides of the triangle and 2S=a+b+c. Write a program to compute the area of the triangle given the values of a, b and c

CODDING:
---------------




void main()
{
int a,b,c;
float S,Area;
a=b=c=S=0;
clrscr();

a=20;
b=30;
c=40;
S=(a+b+c)/2;
Area=sqrt(S*(S-a)*(S-b)*(S-c));
printf("Area of a triangle is= %f",Area);
getch();
}

OUTPUT:
-------------
Area of a triangle is= 290.473755

download C Solutions App https://goo.gl/JVY4dT

30/12/2016

QUESTION:
---------------
Given the values of three variables a, b and c, write a program to compute and display the values of x, where
X= a / (b -c)
Execute your program for the following values:
(a) a=250, b==85,c=25

CODDING:
---------------


void main()
{
clrscr();
int a,b,c;
float x;
a=250;
b=85;
c=25;
x=a/(b-c);
printf("x = %f\n",x);
a=300;
b=70;
c=70;
x=a/(b-c);
printf("x = %f\n",x);
getch()

OUTPUT:
-------------
x=4.000000

11/12/2016

QUESTION:
-----------
Given two integers 20 and 10, write a program that uses a function add() to add these two numbers and sub() to find the difference of these two numbers and then display the sum and difference in the following form:
20 + 10 = 30
20-10 = 10

CODDING:
---------


void main()
{
clrscr();
int Sum,Diff;
printf("First Number 20\n");
printf("Second Number 10\n");
Sum=20+10;
Diff=20-10;
printf("20 + 10 = %d\n", Sum);
printf("20 -10 = %d", Diff);
getch();
}

OUTPUT:
--------
20 + 10 = 30
20 -10 = 10

11/12/2016

QUESTION:
------------
Given the radius of a circle, write a program to compute and display its area.
Use a symbolic constant to define the p value and assume a suitable value for
radius.

CODDING:
----------


PIE 3.14
void main()
{
clrscr();
float Rad,Area;Rad=4;
Area=PIE*Rad*Rad;
printf("Area of a circle is--> %f",Area);
getch();
}

OUTPUT:
-----------
Area of a circle is 50.240002

11/12/2016

Making pattern without for loop...

QUESTION:
---------
Write a program using one print statement to print the pattern of asterisks as
shown below :
*
**
***
****

CODDING:
--------


void main()
{
clrscr();
printf("* \n* * \n* * * \n* * * *");
getch();

OUTPUT:
---------
*
**
***
****

07/07/2015

Hi Friends....
Lets Hello the world...!!




void main()
{
clrscr();
printf("Hello World....!!!");

getch();
}

Now Smile plz.....:)

25/04/2015

Hey Friends !! Can u guess the output ???

# include
# include
void main()
{
char ch[]="I AM AN IDIOT.";
char c='A';
int i=0;
while(c)
{
c=getch();
printf("%c\a",ch[i]);
i++;
if(i==14)
{
printf(" "); i=0;
}
}
}

29/12/2014

Address

Surat
395010

Alerts

Be the first to know and let us send you an email when Learn C Language Online posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Learn C Language Online:

Share