100% structure basic program with book details
// Online C compiler to run C program online
#include <stdio.h>
void main()
{
struct book
{
int nop;
char name;
float price;
}b;
printf("\n enter name of the book:");
scanf("%c",&b.name);
printf("\n enter no of pages:");
scanf("%d",&b.nop);
printf("\n enter PRICE OF book:");
scanf("%f",&b.price);
printf("\n name of the book:%c",b.name);
printf("\n no of pages:%d",b.nop);
printf("\n price:%f",b.price);
}
#include <stdio.h>
void main()
{
struct book
{
int nop;
char name;
float price;
}b;
printf("\n enter name of the book:");
scanf("%c",&b.name);
printf("\n enter no of pages:");
scanf("%d",&b.nop);
printf("\n enter PRICE OF book:");
scanf("%f",&b.price);
printf("\n name of the book:%c",b.name);
printf("\n no of pages:%d",b.nop);
printf("\n price:%f",b.price);
}
తెరమీద
enter name of the book:z
enter no of pages:786
enter PRICE OF book:20.5
name of the book:z
no of pages:786
price:20.500000
enter no of pages:786
enter PRICE OF book:20.5
name of the book:z
no of pages:786
price:20.500000
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.