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 code in while loop that returns the output of given code?

2071


How to Throw some light on the splay trees?

1101


Ow can I insert or delete a line (or record) in the middle of a file?

1048


What is this infamous null pointer, anyway?

1104


Explain what is wrong in this statement?

1178


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

1066


What is volatile variable in c?

1155


write a proram to reverse the string using switch case?

3006


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2596


What is the use of bitwise operator?

1173


Where can I get an ansi-compatible lint?

1202


What is a void pointer? When is a void pointer used?

1106


if p is a string contained in a string?

1891


How to find a missed value, if you want to store 100 values in a 99 sized array?

1462


How do you use a pointer to a function?

1148