No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include<stdio.h> main() char a,m; printf("1st\n"); scanf("%c",&a); printf("2nd\n"); scanf("%c",&m); |
|
#include<stdio.h> #include<string.h> typedef struct { char name[20]; long int ptn; float lt; }census; int main() { int i,n; census city[10]; printf("How many cities\n"); scanf("%d",&n); for(i=0;i<n;i++) { census city[10]; printf("Name:"); gets(city[i].name); printf("\nPopulation:"); scanf("%ld",&city[i].ptn); printf("\nlteracy:"); scanf("%f",&city[i].lt); } } |
|
#include<stdio.h> #include<string.h> typedef struct { char name[20]; long int ptn; float lt; }census; int main() { int i,n; census city[10]; printf("How many cities\n"); scanf("%d",&n); for(i=0;i<n;i++) { census city[10]; printf("Name:"); gets(city[i].name); printf("\nPopulation:"); scanf("%ld",&city[i].ptn); printf("\nlteracy:"); scanf("%f",&city[i].lt); } } |