Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals of Digital Logic and Microcontrollers

Authors: M. Rafiquzzaman

6th edition

1-118-85579-9, 1118855795, 9781118969304, 978-1118855799

More Books

Students also viewed these Programming questions

Question

4 cubed + 10 X 20 + 8 squared 23

Answered: 1 week ago