Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts

Virtual University 8th Convocation Complete Details

By: // No comments:

Virtual University 8th Convocation

Virtual University 8th Convocation (Karachi) is scheduled to be held on April 4, 2017 at 9:30 am at Pearl Continental Hotel - PC Hotel Karachi. For this, invitation letters are being dispatched to all registered graduates of Karachi event. Previously we shared List Of Virtual University 8th Convocation Position Holders.

How to Join Virtual University 8th Convocation

Please do not forget to print your invitation card and your guest’s entry card (which is mandatory for entrance) from the following link:
http://www.vu.edu.pk\convocation\

8th Convocation Important Instructions:

1. Entry into the venue is restricted to card holder only
2. One card is valid for one person only
3. To avoid any embarrassment, please do not bring your children
4. Bring your original CNIC & one photocopy without which degree shall not be delivered
5. Mobile phones & electronic devices are strictly prohibited inside hall

Also Read: Virtual University Academic Calendar Spring 2017

In case of any query, students may contact at:
1. Ph # 042-99204760, 99203899
2. Email : convocation@vu.edu.pk

Tags: 8th Convocation, Virtual University, Virtual University 8th Convocation, How to, VU, Virtual University of Pakistan, Virtual University updates, Virtual University Students.

if You have any Question or Query in mind let us know in comments. Thanks

How to write C++ Program to make a Simple Snake Game

By: // No comments:

C++ Program to make a Simple Snake Game

Today in C++ Tutorial we will learn how to write C++ Program to make a Simple Snake Game. In this tutorial i will going to show you how to make a fun snake game using c++ programming language.
How to write C++ Program to make a Simple Snake Game
How to write C++ Program to make a Simple Snake Game

Simple Snake Game

Snake Game is actually a mini project for first semester students .It is console application without graphic library that's why it is more interesting.This game is perfect without any error and better user interface.It is complied in c++ language.Here goes a source code you can copy and compile it . I hope it will be helpful.

Source code:

Here is the source Code of C++ Program to make a Simple Snake Game.

#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
bool gameOver;
const int width = 20;
const int height = 20;
int x, y, fruitX, fruitY, score;
int tailX[100], tailY[100];
int nTail;
enum eDirecton { STOP = 0, LEFT, RIGHT, UP, DOWN};
eDirecton dir;
void Setup()
{
gameOver = false;
dir = STOP;
x = width / 2;
y = height / 2;
fruitX = rand() % width;
fruitY = rand() % height;
score = 0;
}
void Draw()
{
system("cls"); //system("clear");
for (int i = 0; i < width+2; i++)
cout << "#";
cout << endl;

for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
if (j == 0)
cout << "#";
if (i == y && j == x)
cout << "O";
else if (i == fruitY && j == fruitX)
cout << "F";
else
{
bool print = false;
for (int k = 0; k < nTail; k++)
{
if (tailX[k] == j && tailY[k] == i)
{
cout << "o";
print = true;
}
}
if (!print)
cout << " ";
}

if (j == width - 1)
cout << "#";
}
cout << endl;
}

for (int i = 0; i < width+2; i++)
cout << "#";
cout << endl;
cout << "Score:" << score << endl;
}
void Input()
{
if (_kbhit())
{
switch (_getch())
{
case 'a':
dir = LEFT;
break;
case 'd':
dir = RIGHT;
break;
case 'w':
dir = UP;
break;
case 's':
dir = DOWN;
break;
case 'x':
gameOver = true;
break;
}
}
}
void Logic()
{
int prevX = tailX[0];
int prevY = tailY[0];
int prev2X, prev2Y;
tailX[0] = x;
tailY[0] = y;
for (int i = 1; i < nTail; i++)
{
prev2X = tailX[i];
prev2Y = tailY[i];
tailX[i] = prevX;
tailY[i] = prevY;
prevX = prev2X;
prevY = prev2Y;
}
switch (dir)
{
case LEFT:
x--;
break;
case RIGHT:
x++;
break;
case UP:
y--;
break;
case DOWN:
y++;
break;
default:
break;
}
//if (x > width || x < 0 || y > height || y < 0)
// gameOver = true;
if (x >= width) x = 0; else if (x < 0) x = width - 1;
if (y >= height) y = 0; else if (y < 0) y = height - 1;

for (int i = 0; i < nTail; i++)
if (tailX[i] == x && tailY[i] == y)
gameOver = true;

if (x == fruitX && y == fruitY)
{
score += 10;
fruitX = rand() % width;
fruitY = rand() % height;
nTail++;
}
}
int main()
{
Setup();
while (!gameOver)
{
Draw();
Input();
Logic();
Sleep(10); //sleep(10);
}
return 0;
}

More C++ Programming Example Codes

Write ALLAH Using C++ Program

How to write C++ program to find Fibonacci Series

How to Write C++ Program to Find Prime Number

How to write C++ Program to find factorial of Number

What is Recursive function in c++ with Examples

C++ program to Make Simple calculator

Find the HCF and LCM by using the C++


Tags: c++, C++ language, C++ Programming Language, c++ tutorials, How to write C++ Program, Programming in C++, write a c++ program, Simple Snake Game, How to, How to make a Simple Snake Game.

If you have any queries related to How to write C++ program to make a Simple Snake Game please share with us in comments:

How to write C++ Program to find factorial of Number

By: // No comments:

Write C++ Program to find factorial of Number.

Today we will learn How to Find factorial of Number Using C++ Program.
But First of All lets discuss what is a Factorial. it is denoted by n!


Also Read: How to write C++ program to find Fibonacci Series

What is a Factorial ?

The factorial of a number 'n' is the product of all number from 1 up-to the number 'n'

it is denoted by n!. For example n=5 then factorial of 5 will be 1*2*3*4*5= 120. 5!= 120

write C++ Program to find factorial of Number
 Code of++ Program to find factorial of Number

Factorial program in C++ Logic:


  • First think what is the factorial of a number? 
  • How mathematically it can be calculated?
  • If you understand it now then it will be very easier to make a C++ Program logic to find the factorial.
  • User enters a number and we have to multiply all numbers up-to entered number.
  • Like if user enters 6 then Factorial should be equal to factorial= 1*2*3*4*5*6.
  • In this case a for Loop will be very helpful. It will start from one and multiply all numbers up-to entered number after it loop will be terminated.
  • Take a variable and initialized it to 1 and in loop store multiplication result into it like in below program a variable 
  • Factorial is used for this purpose.what is we does not initialized it to 1 and initialized it to zero or remain it uninitialized. In case of 0 our result will be zero in case of any number entered
  • In case of not initializing it our answer will correct mostly but if variable contains garbage value then we will not be able to get correct result. 
  • It is recommended that to initialize it to one.
Also Read: How to Write C++ Program to Find Prime Number

C++ Program to find factorial of Number


#include<iostream>

using namespace std;

int main()

{

int num,factorial=1;

cout<<" Enter Number To Find Its Factorial: ";

cin>>num;

for(int a=1;a<=num;a++)

{

factorial=factorial*a;

}

cout<<"Factorial of Given Number is ="<<factorial<<endl;

return 0;

}

Also Read: How to write C++ Program to find factorial of Number


If you have any queries related to How to write C++ program to find factorial of Number please comment below:

Apply For Rescheduling Of Missed Midterm Paper

By: // No comments:

Apply For Rescheduling - Midterm Paper

Here is the Latest Update for Fall 2016 Mid Term Examinations: Now Students can Apply For Rescheduling Of Missed/Unplanned Midterm Paper. for Details of Rules and Procedure please Read this Complete Article.

Also Read: Virtual University 8th Convocation List Of Position Holders

Midterm Paper Rescheduling Rules:

  1. A student may request for re-scheduling of missed/unplanned paper(s) on payment of prescribed fee .
  2. Only missed/unplanned paper(s) can be rescheduled.
  3. The re-schedule chance shall be provided one time only as per the given schedule.
  4. The decision of the University about re-scheduling i.e. city/center/date/time shall be final.
Also Read: VU Course Selection - Rules And Procedure

Midterm Paper Rescheduling Procedure:

Dear Virtual University students, You may request for rescheduling of missed/unplanned paper(s) from Student Services on or before Friday, December 30,2016 (No request will be considered after the specified date.)

Goto : Vulms => Student Services =>Examinations Department => Apply for Rescheduling of Papers

Once your request is duly processed, a confirmation email will be sent on your VU email from no-reply@vu.edu.pk.

(Virtual University requires at least 24-48 hours for processing your request.)
Now, you must take a fresh print of your Exam Entrance slip from http://datesheet.vu.edu.pk
In case of any query regarding rescheduling, please Contact at rescheduling@vu.edu.pk

This Update was Published On:  Sunday, December 18, 2016

Also Read: VU Course Selection - Guideline and Help

Important Note:

Please note that rescheduled paper(s) will be conducted on Sunday, January 1, 2017.Fee voucher of prescribed fee shall be payable before the announcement of result.

You Can Also Download Solved Mid Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015-16.

How to make a Assignment - Instructions and Help

By: // No comments:

How to make a Assignment.

Dear Virtual University Students, Here is the Complete tutorial with Step by Step instructions on how to Make a Assignment. Preparation of Assignments is a creative art and asks the student put all energies to resolve the problems based on knowledge she/he got during last sessions.
Assignment should be in your own wordings not copied from internet, handouts or books.
Also Read: Virtual University (VU) Exams Pattern

Follow Steps to Make a Assignment

Here are some Steps involved in making a good Assignment
  • Understand The Question
  • Set Solution Time period
  • Collect Relative Information and Data
  • Make First Draft of Solution
  • Recheck & Make Second Draft
  • Make Final Draft
Also Read:  How To Solve MCQs Fast With Maximum Correct Answers

How to Make a Assignment - Instructions

Please, follow the Given steps for making a Good Assignment.
  • Download the Assignment file from VULMS.
  • Read the instructions carefully and also check the format of file in which you have to submit the assignment. Like in ENG, MGT, PAK it is (.doc or .docx format) i.e. MS word default format. While for CS it is .html format. Make sure you are submitting the file of required format.(It may change according to the subjects better read the instructions carefully first).
  • Duplicate the assignment file by Copy, Paste. & If it is PDF file then make a new word file in .doc or .docx format or any other which is given in instruction .
  • Now open the duplicate file and edit it Or if new then make it according to the given steps.
  • While Editing first remove the Instruction from the top.
  • Now on Top add heading e.g. if it is English Assignment then write (ENG101 Fall 2016 Assignment 2 or CS101 Fall 2016 Assignment 2).
  • After adding the heading go down and on right or Left corner write your student ID followed by Date on other corner.
  • After completing all these steps now answer each question respectively. Write the answers under the Questions and make the questions bold so they can be easily recognized.
  • After completing the assignment Save It and rename it to your subject and assignment no. along with student ID. Like: ( ENG101 Assignment 1 Fall 2016 (BCxxxxxx).
  • Check it twice thrice after completion for any errors or corrections.
  • After checking if you are confident that it is correct submit it on VULMS. And Try to complete and submit it before due date. Because after due date no assignment will be accepted.
  • Before submitting make sure that file is not corrupted and is 100% zoomed. 
  • For submitting go to the Assignment section of the subject. Click on Submit, browse and upload the file.
  • After your assignment is submitted it will show a message to you that your assignment/file has been submitted successfully. If not it will show an error that your file has not been submitted, In this case try submitting again.
  • Deadlines for submission must be strictly Noticed. Late assignments are not accepted since the Virtual University already makes an allowance for infrastructure problems such as power loss etc.
Also Read:  WHAT IS THE DIFFERENCE BETWEEN CGPA AND EFFECTIVE CGPA

You Can Also Download Solved Mid Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015-16.

Thank You For Reading. Subscribe Us for Assignment Solutions and Mid/Final Term Past Papers. Good Luck