wala kasi akong background. basic steps sana pa'no gumawa yung beginner friendly
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
waitpa bm
lods may telegram ka bapa bm
before 9 kasi kailangan tas di ako marunong kahit basic stuff, bago lang talaga sakin.post ko na lang dito lods yung magiging solution. pa bookmark muna, may ginagawa lang saglit.
#include <stdio.h>
int main(void)
{
char fname[256];
char lname[256];
int bir_year, age;
float weight;
printf("Enter first name: ");
scanf("%s", fname);
printf("Enter last name: ");
scanf("%s", lname);
printf("Enter your year of birth: ");
scanf("%d", &bir_year);
printf("Enter your age: ");
scanf("%d", &age);
printf("Enter your weight: ");
scanf("%f", &weight);
printf("Your name is %s %s.", fname, lname);
printf(" You were born on %d.", bir_year);
printf(" You are %d years old.", age);
printf(" Your weight is %f kg.", weight);
return 0;
}
lods, may tg ka? pwede pa-include ng details ko exactly as variables?C:#include <stdio.h> int main(void) { char fname[256]; char lname[256]; int bir_year, age; float weight; printf("Enter first name: "); scanf("%s", fname); printf("Enter last name: "); scanf("%s", lname); printf("Enter your year of birth: "); scanf("%d", &bir_year); printf("Enter your age: "); scanf("%d", &age); printf("Enter your weight: "); scanf("%f", &weight); printf("Your name is %s %s.", fname, lname); printf(" You were born on %d.", bir_year); printf(" You are %d years old.", age); printf(" Your weight is %f kg.", weight); return 0; }
lods, may tg ka? pwede pa-include ng details ko exactly as variables?
#include <stdio.h>
int main(void)
{
char height[100], name[100], birth[200], place[200];
int age;
float weight;
printf("Enter first name: ");
scanf("%[^\n]%*c", name);
printf("Enter your date of birth: ");
scanf("%[^\n]%*c", birth);
printf("Enter your place of birth: ");
scanf("%[^\n]%*c", place);
printf("Enter your age: ");
scanf("%d", &age);
printf("Enter your weight: ");
scanf("%f", &weight);
printf("Enter your height: ");
scanf("%s", height);
printf("Your name is %s.", name);
printf(" You were born on %s.", birth);
printf(" You are %d years old.", age);
printf(" You were born in %s.", place);
printf(" Your weight is %f kg.", weight);
printf(" Your height is %s.", height);
return 0;
}