Print hello world
Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.
Write a C++ program that read student’s subject marks from file named (std_makrs.txt) which contains the marks of 5 students. Each row of the file represents the subject marks of a student. Total subject registered for each student is saved into file named (std_subject.txt)
Study codes given below and add your own codes so that the program is able to:
- count and display the number of vowels exist in the array
- replace all those alphabets after ‘q’ with the symbol ‘*’
- display the latest contents of the array
#include<iostream>
using namespace std;
int main()
{
char myArray[] = {'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i','o', 'n', 'a', 'l'};
//add your codes here
cout<<endl;
system("pause");
return 0;
}
1.Write a C++ program that accepts two 4X4 matrices, and calculates:
A.Sum of the matrices
B.Product of the matrices
Define your functions to do the tasks.
3.Write a C++ program that accepts sentence from the user, and counts total number of vowel or consonant, and displays the vowel and consonant sentence.
4.Write a C++ program that works exactly like strcat built-in function. It accepts two strings then it concatenates the second string to the first string. Define your function.
5.Write a C++ program that works exactly like strcnmp built-in function. It accepts two strings then it compares the two strings alphabetically considering number of characters to be compared, which is specified by the user. Define your function.
Write a code to return the following structure from function:
Structure name is Patientand haveTHE following members.
Name, cnic, sugar_level.