answersLogoWhite

0


Best Answer

give print then select print to file give the file name that file may prn file by

User Avatar

Wiki User

18y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you print a .prn file using vb code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write a c program for hospital database using priority queue?

#include<stdio.h> #include<conio.h> typedef struct prque { char p_name[20]; int prn; struct prque *next; }prque; prque * insert(prque *); prque * delet(prque *); void display(prque *); int main() { int i,ch,n,prn1; char p_name1[20]; prque *front; clrscr(); front=NULL; do { printf("\n1)Patient Entry"); printf("\n2)Delete"); printf("\n3)display Patiant List."); printf("\n4)Exit"); printf("\nEnter your choice:"); scanf("%d",&ch); switch(ch) { case 1: front=insert(front); break; case 2: printf("\nPatient Name Deleted:%s\n",front->p_name); front=delet(front); break; case 3: display(front); break; case 4:exit(0); } }while(ch!=4); getch(); return 0; } prque *insert(prque *front) { char p_name[20]; int prn; prque *temp,*current,*prev; temp=(prque*)malloc(sizeof(prque)); printf("\nEnter patient name:"); scanf("%s",temp->p_name); printf("\nEnter Status:\n1)General Check up\t2)Non Serious\t3)Serious.\t"); scanf("%d",&prn); temp->prn=prn; temp->next=NULL; if(front==NULL) { front=temp; } else { if(prn>front->prn)//Insert at front { temp->next=front; front=temp; } else if(prn<=front->prn) //insert at middle { current=front; while(current->prn>=prn && current!=NULL) { prev=current; current=current->next; } temp->next=prev->next; prev->next=temp; } } return(front); } prque * delet(prque *front) { prque *temp; if(front==NULL) { printf("\nQueue is Underflow."); return(front); } else { temp=front; front=front->next; free(temp); } return(front); } void display(prque *front) { prque *p; p=front; printf("\n--------------------------------------------------"); printf("\n\tPatient Name\t\tPriority\n"); printf("--------------------------------------------------"); while(p!=NULL) { printf("\n\t%s",p->p_name); if(p->prn==3) printf("\t\t\tSerious"); else if(p->prn==2) printf("\t\t\tNon serious"); else if(p->prn==1) printf("\t\t\tGenaral Checkup"); p=p->next; } } /* Output: 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Afridi Enter Status: 1)General Check up 2)Non Serious 3)Serious. 3 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Ponting Enter Status: 1)General Check up 2)Non Serious 3)Serious. 2 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Sangakara Enter Status: 1)General Check up 2)Non Serious 3)Serious. 3 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice: 1 Enter patient name:Clerke Enter Status: 1)General Check up 2)Non Serious 3)Serious. 1 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Afridi 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Vittori Enter Status: 1)General Check up 2)Non Serious 3)Serious. 2 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Dilshan Enter Status: 1)General Check up 2)Non Serious 3)Serious. 3 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:1 Enter patient name:Malinga Enter Status: 1)General Check up 2)Non Serious 3)Serious. 1 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Sangakara 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:3 -------------------------------------------------- Patient Name Priority -------------------------------------------------- Dilshan Serious Ponting Non serious Vittori Non serious Clerke Genaral Checkup Malinga Genaral Checkup 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Dilshan 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Ponting 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Vittori 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Clerke 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:Malinga 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:2 Patient Name Deleted:(null) Queue is Underflow. 1)Patient Entry 2)Delete 3)display Patiant List. 4)Exit Enter your choice:4 */ Written by: Fabianski Benjamin


Write a program in c to print a mark sheet?

import java.util.*; import java.lang.String; import java.io.*; import java.util.Date; import java.util.Timer; class project { public static void main(String args[]) throws IOException { String sub1,sub2,sub3,sub4,sub5,sub6; String name,sem; int m1,m2,m3,m4,m5,m6,m7; //Date dt = new Date(now.getTime() int prn_no,seat_no,total; float per; float temp; String msg="*"; long currentTimeInMillis = System.currentTimeMillis(); Date today = new Date( currentTimeInMillis ); Scanner in=new Scanner(System.in); BufferedReader b=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter name of student="); name=b.readLine(); System.out.println("Enter prn number ="); prn_no=in.nextInt(); System.out.println("Enter name of semester="); sem=b.readLine(); System.out.println("Enter Roll number ="); seat_no=in.nextInt(); System.out.println("Enter first subject name ="); sub1=b.readLine(); System.out.println("Enter marks ="); m1=in.nextInt(); System.out.println("Enter second subject name ="); sub2=b.readLine(); System.out.println("Enter marks ="); m2=in.nextInt(); System.out.println("Enter third subject name ="); sub3=b.readLine(); System.out.println("Enter marks ="); m3=in.nextInt(); System.out.println("Enter fourth subject name ="); sub4=b.readLine(); System.out.println("Enter marks ="); m4=in.nextInt(); System.out.println("Enter fifth subject name ="); sub5=b.readLine(); System.out.println("Enter marks ="); m5=in.nextInt(); System.out.println("\t\t\t\t\t\t DR.BABASAHEB AMBEDKAR MARATHWADA UNIVERSITY"); System.out.println("\t\t\t\t\t\t\tAurangabad-431004"); System.out.println("STUDENT NAME:"+name+"\t\t\tprn :"+prn_no+"\t\t\tSEAT NO:"+seat_no+"\t\t\tSEMESTER:"+sem); System.out.println("------------------------------------------------------------------------------------"); System.out.println("\n\n| SUBJECTS"+"\t\t\t\t|\tMAXIMUM MARKS"+"\t|\t min marks"+"\t|\tOBTAINED MARKS"); System.out.println("------------------------------------------------------------------------------------"); if(m1>40) msg=""; else msg="*"; System.out.println("|"+sub1+"\t\t\t\t\t\t|\t100\t\t\t\t|\t40\t\t\t|\t"+m1); if(m2>40) msg=""; else msg="*"; System.out.println("|"+sub2+"\t\t\t\t\t\t|\t100\t\t\t\t|\t40\t\t\t|\t"+m2); //System.out.println(+sub2+"\t\t\t"+"|"+"\t\t100"+"\t\t\t"+"|"+"\t\t40"+"\t\t\t\t"+"|"+"\t\t"m2+msg+"\t|"); if(m3>40) msg=""; else msg="*"; System.out.println("|"+sub3+"\t\t\t\t\t\t|\t100\t\t\t\t|\t40\t\t\t|\t"+m3); //System.out.println(+sub3+"\t\t\t"+"|"+"\t\t100"+"\t\t\t"+"|"+"\t\t40"+"\t\t\t\t"+"|"+"\t\t"m3+msg+"\t|"); if(m4>40) msg=""; else msg="*"; System.out.println("|"+sub4+"\t\t\t\t\t\t|\t100\t\t\t\t|\t40\t\t\t|\t"+m4); //System.out.println(+sub4+"\t\t\t"+"|"+"\t\t100"+"\t\t\t"+"|"+"\t\t40"+"\t\t\t\t"+"|"+"\t\t"m4+msg+"\t|"); if(m5>40) msg=""; else msg="*"; System.out.println("|"+sub5+"\t\t\t\t\t\t|\t100\t\t\t\t|\t40\t\t\t|\t"+m5); //System.out.println(+sub5+"\t\t\t"+"|"+"\t\t100"+"\t\t\t"+"|"+"\t\t40"+"\t\t\t\t"+"|"+"\t\t"m5+msg+"\t|"); System.out.println("------------------------------------------------------------------------------------"); total=m1+m2+m3+m4+m5; System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t TOTAL ::"+total+"/500"); temp=(float)total/500; per=temp*100; System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t PERCENTAGE ::"+per+"%"); System.out.println("------------------------------------------------------------------------------------"); if(m1<40&&m2<40&&m3<40&&m4<40&&m5<40) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT ::DROPPED"); System.out.println("------------------------------------------------------------------------------------"); } else if(m1<40&&m2<40m3<40&&m4<40&&m5<40) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT ::A.T.K.T."); } else if(per<35) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT ::FAILED"); } else if(per>=35&&per<40) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT ::passed"); } else if(per>=40&&per<59) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT :::passed with SECOND CLASS"); } else if(per>=60&&per<75) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT :passed with first class"); } else if(per>=75) { System.out.println("\t\t\t\t\t\t\t\t\t\t\t\t\t"+"|"+"\t\t RESULT :passed with DISTINCTION class"); } System.out.println( today ); } }


Related questions

How do you print prn file?

Try for some prn to dox convertors


How do you print a .PRN file?

The PRN file gives the computer information about the printer. The PC Magazine site has specific instructions for you to add a printer to your system that will work.


How can you convert PRN files to PDF?

A .prn file is about the most useless file type Microsoft have come up with. Windows programmes allow you to 'print to a file' but then give you no way of actually doing anything with the file. If your printer was a PostScript type, then it might be possible to convert the .prn file to a .pdf by renaming it as .ps instead of .prn and running it though a programme such as ghostscript.


How would you send the contents of a file to your printer using the type command?

It wouldn't be formatted for your particular printer or page size, but you can pipe the output to PRN: TYPE FILENAME.TXT > PRN


What is an LPT1 on a computer?

It is a device file used for Parallel port. Consider the following command dir >prn (or) lpt1 dir >com1 dir >com2 that is the input is sent to the specified device file or device or a file.


How do you convert a doc file containing only funny signs created from a prn file back to a prn file?

I got already an answer from another source: it's impossible: http://www.frogmore-raw-print.com/forum.html?cmd=getpost&id=281


What is the full form prn?

PRN is short form of printer stands for Printer Text File,a file extension type to troubleshoot window system .PRN stands for PRO RE NATA uses in medication,that allows for exceeding a prescribed daily regimen.PHYSICIAN RESEARCH NETWORKhttp://www.prn.org/PREMIER REAL NETWORKhttp://www.prn.com/PERFORMANCE RACING NETWORKhttp://www.prn.com/PRN also stands for more other purpose.PURE REAL NETWORKPulse Range NavigationPseudo-Random NoiseProgram Release Notice


What is theSettings for dot matrix printer to print through command prompt?

Do the following: COPY PRN LPT1: (now you type what you want to print) Press CONTROL + Z, then ENTER. []s Groke


What does PRN do to the patient?

PRN does not do anything to a patient. It is a medical abbreviation that means "as needed". A medication or treatment ordered as PRN means to give it as needed.


Why can't we create any file in windows as CON?

"CON" is a reserved DOS device name, along with "PRN", "AUX" and "NUL".


The patient will followup on a prn basis?

follow up prn


What does prn mean on schedule for hospital?

PRN means - As Needed