Question
Write comment every single line please in following code #include int main() { unsigned int Id; printf(Enter 8 digit stud id number); scanf(%d,&Id); int n;
Write comment every single line please in following code
#include
int main()
{
unsigned int Id;
printf("Enter 8 digit stud id number\\");
scanf("%d",&Id);
int n;
char set;
int psi,E;
n=Id%10;
unsigned int k=Id;
while(k>99)
k=k/10;
n=n+k%10;
n=n*2;
if(n>14&&n<=19)
{
set=\'A\';
psi=2;
E=4;
}
else if(n>=20&&n<=25)
{
set=\'B\';
psi=3;
E=2;
}
else if(n>=26&&n<=31)
{
set=\'C\';
psi=3;
E=3;
}
else if(n>=33&&n<=36)
{
set=\'D\';
psi=2;
E=3;
}
printf("Student id number=%u\\",Id);
printf("Question set=%c\\",set);
printf("Variable values psi=%d E=%d", psi,E);
return 0;
}
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Fundamentals of Digital Logic and Microcontrollers
Authors: M. Rafiquzzaman
6th edition
1-118-85579-9, 1118855795, 9781118969304, 978-1118855799
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App