- Forum > C - Program
3/21/2007 12:41 PM C - Program (8 Comments)
- Ravi Kant
- 24, India
C - Program
hello
all of you
i am a student . i have a problems .
send a c program of addition of two numbers with out using any brackets. please send me.
all of you
i am a student . i have a problems .
send a c program of addition of two numbers with out using any brackets. please send me.
3/29/2007 7:14 AMRe: Re: C - Program
Uday
19, India
hi i am a also learning c. in the above commands why have u put return 0; after printf("%d",s);. I mean what does return 0;do and why is it needed because as it is we we havn't put it in a loop so why return 0. Is there no need to have clrscr(); before the int. Please reply to me asap.
4/11/2007 6:16 PMRe: Re: Re: Re: C - Program
BraveHeart
29, Ellar- Tulkarem, Palestine
clrscr(); used to clear the output screen .. if you want that then you have to include conio.h
4/11/2007 6:19 PMsee this in C++ Empty Rectangle
BraveHeart
29, Ellar- Tulkarem, Palestine
#include iostream.h
#include conio.h
#include iomanip.h
void main()
{
clrscr();
int l,w;
cout<<"L=";
cin>>w;
cout<<"W=";
cin>>l;
for(int i=1;i<=l;i++)
{
if((i==1)||(i==l))
{
for(int k=1;k<=w;k++)
cout<<"*";
cout<
}
else
cout<<"*"<
}
getch();
}
check the signs in the header lines.. not allowed here
#include conio.h
#include iomanip.h
void main()
{
clrscr();
int l,w;
cout<<"L=";
cin>>w;
cout<<"W=";
cin>>l;
for(int i=1;i<=l;i++)
{
if((i==1)||(i==l))
{
for(int k=1;k<=w;k++)
cout<<"*";
cout<
else
cout<<"*"<
}
getch();
}
check the signs in the header lines.. not allowed here









3/23/2007 10:25 PMRe: C - Program