#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int marks;
cout<<"Enter Marks of Student=";
cin>>marks;
cout<<"Grade\n";
if(marks>0 && marks<50)
cout<<"F";
else if(marks>=50 && marks<55)
cout<<"C-";
else if(marks>=55 && marks<60)
cout<<"C";
else if(marks>=60 && marks<65)
cout<<"c+";
else of(marks>=65 && marks<69)
cout<<"B-";
else if(marks>=69 && marks<71)
cout<<"B";
else if(marks>=71 && marks<75)
cout<<"B+";
else if(marks>=75 && marks<79)
cout<<"B";
else if(marks>=79 && marks<84)
cout<<"A";
else
cout<<"A";
getch();
}
write a program to print A to Z on screen in c?
echo 'print a pattern'
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
DIM grade(6), lowGrade(5), testName$(6), seq$(6) seq$(1) = "first " seq$(2) = "second" seq$(3) = "third " seq$(4) = "fourth" seq$(5) = "fifth " grLetter$ = "ABCD" begin: COLOR 7, 0 CLS PRINT "Test averaging program" PRINT "======================" PRINT PRINT "Lets enter some basic info before we get started .." PRINT FOR ix% = 1 TO 4 PRINT "enter a number (1-100) that you consider to be the lowest "; MID$(grLetter$, ix%, 1); INPUT lowGrade(ix%) PRINT STRING$(78, "-") NEXT ix% enterTests: COLOR 7, 0 CLS LINE INPUT "Enter student name or / to end program: "; name$ IF name$ = "/" THEN CLS END END IF LINE INPUT "Enter student age : "; age$ age% = VAL(age$) PRINT STRING$(78, "=") FOR ix% = 1 TO 5 PRINT "Enter the subject name for the "; seq$(ix%); " test: "; LINE INPUT testName$(ix%) LINE INPUT "Enter the grade for this test (1-100): "; grade$ grade(ix%) = VAL(grade$) PRINT STRING$(78, "-") NEXT ix% CLS displayReport: COLOR 7, 0 CLS GOSUB computeAverage PRINT "Test Average Report for "; name$ PRINT PRINT "Age is "; age$ IF (age% >= 25) = 0 THEN COLOR 6, 0 PRINT " ** Student is underage **" END IF COLOR 7, 0 stuGrade = average GOSUB determineAthruF PRINT "Test average is"; PRINT USING "###.##"; average PRINT "This is a grade of "; grade$ IF grade$ = "F" THEN COLOR 4, 0 PRINT "** Student did not pass **" END IF COLOR 7, 0 PRINT PRINT "Test Summary (those in "; COLOR 4, 0 PRINT "red"; COLOR 7, 0 PRINT " are failing)" PRINT FOR ix% = 1 TO 5 COLOR 7, 0 stuGrade = grade(ix%) GOSUB determineAthruF rptName$ = SPACE$(25) MID$(rptName$, 1) = testName$(ix%) IF grade$ = "F" THEN COLOR 4, 0 END IF PRINT rptName$, grade$, PRINT USING "###.##"; stuGrade NEXT ix% COLOR 7, 0 PRINT LINE INPUT "Do you wish to average another student (Y/N) "; yn$ yn$ = UCASE$(yn$) IF yn$ = "Y" THEN GOTO enterTests END IF END computeAverage: total = 0 FOR ix% = 1 TO 5 total = total + grade(ix%) NEXT ix% average = total / 5 RETURN determineAthruF: IF stuGrade >= lowGrade(4) THEN grade$ = "D" IF stuGrade >= lowGrade(3) THEN grade$ = "C" IF stuGrade >= lowGrade(2) THEN grade$ = "B" IF stuGrade >= lowGrade(1) THEN grade$ = "A" END IF END IF END IF ELSE grade$ = "F" END IF RETURN
write a program to print the series 1/12+1/22+.........+1/n2 ?
This is a directive, not a question.
good morning
Yes.
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
include <stdio.h> int main (void) { puts ("print"); return 0; }
You usally learn cursive in 3rd grade, and you get print-offs on google.
' '*** PROGRAM: Collecting student data: names/marks. ' '*** Create 2 array variables to store each students name/marks... DIM students$(10), marks$(10) '*** SCREEN ONE/Collect the data... CLS '...(CL)ear the Output (S)creen '*** print heading... PRINT "PROGRAM: Collecting each student names/marks..." PRINT '*** A FOR/NEXT loop is used to collect each individual students data... FOR eachStudentNo% = 1 TO 10 '*** Get each students names/marks 'by typing these values in from the keyboard.... PRINT eachStudentNo%; ">" INPUT " Enter student name"; students$(eachStudentNo%) INPUT "Enter student marks"; marks$(eachStudentNo%) NEXT '*** SCREEN TWO: Output the collected data... CLS '...(CL)ear the Output (S)creen '*** Print headings... PRINT "Student No.", "Student Name", "Student Marks" PRINT '*** FOR/NEXT loop is used to print out the 2 array student 'name/marks' values... FOR eachStudentNo% = 1 TO 10 '*** print out each students 'number/name/mark' values... PRINT eachStudentNo%, PRINT students$(eachStudentNo%), PRINT marks$(eachStudentNo%) NEXT END '...END of program/halt program code execution