Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#include<stdio.h>
#include<conio.h>
void main()
{clrscr();
char another='y';
int num;
for(;another=='y';)
{
printf("Enter a number");
scanf("%d",&num);
printf("squre of %d is %d",num,num*num);
printf("\nwant to enter another number y/n");
scanf("%c",&another);
}
getch();
}
the above code runs only one time.on entering 'y' the
screen disappeares.what can i do?

Answer Posted / jyoti goyal

Just replace %c by %s in the last scanf.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a conditional inclusion statement in C?

1067


What is sizeof in c?

1014


What are pointers?

1114


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2645


What is the difference between pure virtual function and virtual function?

1126


which type of aspect you want from the student.

2166


Is null always equal to 0(zero)?

1037


What is atoi and atof in c?

1088


Explain can static variables be declared in a header file?

1155


What is the difference between union and structure in c?

1181


How can you access memory located at a certain address?

1121


How can you find out how much memory is available?

1072


How is a macro different from a function?

1187


How many bytes are occupied by near, far and huge pointers (dos)?

1158


When should a far pointer be used?

1133