Write and run a program that reads the users age and then prints "You are a Child" if the age < 18, " You are an adult." if 18<=age<65, and "You are a senior citizen." if age >=65.
main() { int age; while(scanf("%d", &age)==1) { if(age<18) printf("You are a Child.\n"); else if(age>=18&&age<65) printf("You are an adult.\n"); else if(age>=65) printf("You are a senior citizen.\n"); }
#include main(){ int a; printf("Enter your age : "); scanf("%d",&a); if(a<18) printf("your are child!"); else if(a>=18 && a<=65) printf("you are matured!"); else printf("you are senior citizen"); }
#include using namespace std; class people { public: int sum; void calculateage(int age) { if(age<18) cout<<"You are a child"<=18 && age<65) cout<<"you are an adult"<=65) cout<<"You are a senior citizen"<>age;
#include
উত্তরমুছুন#include
main()
{
int age;
printf("enter your age: ");
scanf("%d",&age);
if(age<18)
printf("you are child");
else if(18<=age<=65)
printf("you are adult");
else if(age>65)
printf("you are senior citizen");
getch();
return 0;
}
#include
উত্তরমুছুনmain()
{
int age;
while(scanf("%d", &age)==1)
{
if(age<18)
printf("You are a Child.\n");
else if(age>=18&&age<65)
printf("You are an adult.\n");
else if(age>=65)
printf("You are a senior citizen.\n");
}
return 0;
}
carry on.......and will be continued......
উত্তরমুছুন#include
উত্তরমুছুনmain(){
int a;
printf("Enter your age : ");
scanf("%d",&a);
if(a<18)
printf("your are child!");
else if(a>=18 && a<=65) printf("you are matured!");
else printf("you are senior citizen");
}
Summer 2017
উত্তরমুছুনID#201610042
Answer to the Question No. 5:
https://drive.google.com/file/d/0B99eePh0LV8gR1BHY1c3eXZCcUU/view?usp=drivesdk
https://www.dropbox.com/s/36plauesvs5xinr/age5.cpp?dl=0
উত্তরমুছুনhttps://www.dropbox.com/s/kswhmxj1qgy66s7/AGE.cpp?dl=0
উত্তরমুছুনhttps://www.dropbox.com/s/ep22h2f26bre576/agewithparamiter.cpp?dl=0
উত্তরমুছুনhttps://www.dropbox.com/s/h9uykmc7i537sv7/agewithparamiterwithreturn.cpp?dl=0
উত্তরমুছুনhttps://www.dropbox.com/s/39de6fy4lmxuapv/cal.cpp?dl=0
উত্তরমুছুনhttps://drive.google.com/file/d/0B0Llv4Ca9Ln6SXdSZFZkUUxvM1k/view?usp=sharing
উত্তরমুছুনcorrected one;
উত্তরমুছুনhttps://drive.google.com/file/d/0B0Llv4Ca9Ln6a3ZqWF9zS0lIOEE/view?usp=sharing
ID : 201620195
উত্তরমুছুনhttps://drive.google.com/open?id=0B9K31ospCyFjUkNSd2FCMEtvNHc
https://drive.google.com/open?id=0BzTqZMBWR6eOYzlhUDdQV2UySm8
উত্তরমুছুনhttps://drive.google.com/open?id=0B8369pAqjVVpcHozaEFsM2NRRmM
উত্তরমুছুনwp. https://drive.google.com/open?id=0B8369pAqjVVpYjJycEpjVmhVQkU
উত্তরমুছুনID:201610456
উত্তরমুছুনMD USUF MIA
https://drive.google.com/open?id=0B_PIGnOMR0K2a2N3QkoxazlpSEU
ID:201520552
উত্তরমুছুনhttps://drive.google.com/open?id=0B5pG0kIjzgEKbXM1Y09rWjJOT3M
ID 201610456
উত্তরমুছুনMD USUF MIA
https://drive.google.com/open?id=0B_PIGnOMR0K2enY2SjZ3cTRvVGc
https://drive.google.com/open?id=0B7UQyRdu6h2wZmRjMXR0d0l2Nnc
উত্তরমুছুনhttps://drive.google.com/open?id=0Byxq3aat_mNSTzdOcHdyNzl1RkU
উত্তরমুছুনhttps://www.dropbox.com/s/a9xi1enq5nvh7cc/HW5%20witn%20constructor.cpp?dl=0
উত্তরমুছুনMd Nadim Khandaker
উত্তরমুছুনID: 201630510
#include
using namespace std;
class people
{
public:
int sum;
void calculateage(int age)
{
if(age<18)
cout<<"You are a child"<=18 && age<65)
cout<<"you are an adult"<=65)
cout<<"You are a senior citizen"<>age;
people man;
man.calculateage(age);
}
https://drive.google.com/open?id=0BzKpnVbF4fc3NG1ValNVb3FMUFU
উত্তরমুছুনName:Abdullah Papon
উত্তরমুছুনID:201710933
https://drive.google.com/open?id=0B0bbxKUPFizZcmhScGFGcFdOQk0
https://drive.google.com/open?id=0B3bVD5Ppt_STOFQ5dFE1UVJwbEE
উত্তরমুছুনId= 201710494
উত্তরমুছুনhttps://www.dropbox.com/s/z5f6ag4f7gi09mv/prob%205.cpp?dl=0
https://drive.google.com/open?id=0BxajN_bZJJw0Tl9FMGdNTEN1X0E
উত্তরমুছুনhttps://www.dropbox.com/s/bctvl89kdmgv1fk/AGE.cpp?dl=0
উত্তরমুছুনhttps://drive.google.com/open?id=0B97tDB8iESNCdElmSXBQM3hqMnM
উত্তরমুছুনhttps://drive.google.com/open?id=0B8uArqPAKtGrM1phdE1jcGU1NWc
উত্তরমুছুনhttps://drive.google.com/open?id=0B8uArqPAKtGrM1phdE1jcGU1NWc
উত্তরমুছুনhttps://drive.google.com/open?id=0B8uArqPAKtGrX3FqcUFhMHJ6clU
উত্তরমুছুনID: 201620318
উত্তরমুছুনhttps://drive.google.com/open?id=0B2gcteJZycWoN2NOMHgwVGdGM0U
https://drive.google.com/open?id=0B5eevQy6QwSOS0dIYk1QNTZEX1k
উত্তরমুছুনName: Bithi Paul, ID:201631161
https://drive.google.com/open?id=0Bw0-FMVCC94QWnRMVEJBVnJqZW8
উত্তরমুছুনID:-201610058
উত্তরমুছুন1.https://drive.google.com/open?id=0B7UQyRdu6h2wZmRjMXR0d0l2Nnc