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

Explain the Difference between the New and Malloc keyword.

1100


What is the difference between Printf(..) and sprint(...) ?

1466


What is scope of variable in c?

1011


Explain what does the function toupper() do?

1024


Are there namespaces in c?

1078


How will you divide two numbers in a MACRO?

1093


number of times a digit is present in a number

2004


How do you view the path?

1090


What is the difference between procedural and functional programming?

1033


What functions are in conio h?

1168


What are keywords c?

996


What does the error 'Null Pointer Assignment' mean and what causes this error?

1185


Why does notstrcat(string, "!");Work?

1101


Is this program statement valid? INT = 10.50;

1109


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1679