Uploaded by satwikraj910

1st cpp assignment

advertisement
date:- 22-08-23
sub:- c & cpp
1. how to open cpp ?
2. How to write program in c/cpp?
3. How to save the program ?
4. How to compile the program ?
5. How to run the program ?
f2 :- to save unsaved file
f3 :- to open existing file.
file->open :-to open existing file.
alt+f9 :- to compile the program
ctrl+f9 :- to run the program
file->save :- to save unsaved file
file->new :- to open new page to write a program
file->close :- to close currently opened file
alt+x or file->exit :- to colose cpp window
Assignment 1:-
Wap in c to print hello message on the screen.
step 1 : open cpp window
step 2:- write the program
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Hello");
getch();
}
step 3:- save it with file name.c
step 4:- compile it for checking an errors pressing alt+f9
step 5:- run it pressing ctrl+f9
Assignment 2:-
Wap in cpp to print hello message on the screen.
Assignment 3:-
Wap in c to print hello message in color on the screen.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
textcolor(RED);
printf("\n\n\n\t\t");
cprintf("Hello");
getch();
}
Assignment 4:-
Wap in c to print hello message in color and blink on the screen.
Assignment 5:-
Wap in c to print sum of two numbers.(numbers input at compile time).
Download