63 800
Assignments Done
99,5%
Successfully Done
In August 2018

Answer to Question #16015 in C++ for anika

Question #16015
write c++ program to input a student type ('A' or 'B'). if a student type is 'A' initialize the college account Rs.200/- otherwise initialize the hostel account rs.200/-?
Expert's answer
include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char x;
printf("Enter the category of student: A or B
");
scanf("%c",&x);
if(x=='A')
{
int college = 200;
printf("
Amount initialized to college account
");
printf("Amount added to college account = %d",college);
}
else if(x=='B')
{
int hostel = 200;
printf("
Amount initialized to hostel account
");
printf("Amount added to hostel account = %d",hostel);
}
getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions